-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
No more tests/ui/issues!
#160176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No more tests/ui/issues!
#160176
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| //! Regression test for <https://github.com/rust-lang/rust/issues/37291>. | ||
| //! | ||
| //! The problem was that the starting environment for a specialization | ||
| //! check was not including the where-clauses from the impl when attempting | ||
| //! to normalize the impl's trait-ref, so things like `<C as Foo>::Item` | ||
| //! could not resolve, since the `C: Foo` trait bound was not included in | ||
| //! the environment. | ||
|
|
||
| //@ aux-build:cross-crate-specialization-check.rs | ||
| //@ run-pass | ||
|
|
||
| #![allow(unused_imports)] | ||
|
|
||
| extern crate cross_crate_specialization_check; | ||
|
|
||
| use cross_crate_specialization_check::{CV, WrapperB, WrapperC}; | ||
|
|
||
| fn main() { | ||
| let a = WrapperC(CV); | ||
| let b = WrapperC(CV); | ||
| if false { | ||
| let _ = a * b; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| //! Regression test for <https://github.com/rust-lang/rust/issues/49851>. | ||
| //! Test compiling for a target which is not installed with `no_std` | ||
| //! results in a helpful error message. | ||
| //~^^^ ERROR can't find crate for `core` | ||
|
|
||
| //@ compile-flags: --target thumbv7em-none-eabihf | ||
| //@ needs-llvm-components: arm | ||
| //@ ignore-backends: gcc | ||
| #![deny(unsafe_code)] | ||
| #![deny(warnings)] | ||
| #![no_std] | ||
|
|
||
| extern crate cortex_m; | ||
|
|
||
| fn main() {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| //! Auxiliary file for <https://github.com/rust-lang/rust/issues/38875>. | ||
| pub const FOO: usize = *&0; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| //! Regression test for <https://github.com/rust-lang/rust/issues/38875>. | ||
| //! This used to check `constant evaluation error` span doesn't point | ||
| //! on nothing when const is defined in another crate. | ||
| //@ aux-build:cross-crate-array-len.rs | ||
| //@ check-pass | ||
|
|
||
| extern crate cross_crate_array_len; | ||
|
|
||
| fn main() { | ||
| let test_x = [0; cross_crate_array_len::FOO]; | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. combined |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| //! Regression test for <https://github.com/rust-lang/rust/issues/50264>. | ||
|
|
||
| fn main() { | ||
| let _m = &Some(42).as_deref(); | ||
| //~^ ERROR the method | ||
| let _e = &mut Some(42).as_deref_mut(); | ||
| //~^ ERROR the method | ||
| let _o = &Ok(42).as_deref(); | ||
| //~^ ERROR the method | ||
| let _w = &mut Ok(42).as_deref_mut(); | ||
| //~^ ERROR the method | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| error[E0599]: the method `as_deref` exists for enum `Option<{integer}>`, but its trait bounds were not satisfied | ||
| --> $DIR/option-result-as_deref.rs:4:24 | ||
| | | ||
| LL | let _m = &Some(42).as_deref(); | ||
| | ^^^^^^^^ | ||
| | | ||
| = note: the following trait bounds were not satisfied: | ||
| `{integer}: Deref` | ||
|
|
||
| error[E0599]: the method `as_deref_mut` exists for enum `Option<{integer}>`, but its trait bounds were not satisfied | ||
| --> $DIR/option-result-as_deref.rs:6:28 | ||
| | | ||
| LL | let _e = &mut Some(42).as_deref_mut(); | ||
| | ^^^^^^^^^^^^ | ||
| | | ||
| = note: the following trait bounds were not satisfied: | ||
| `{integer}: Deref` | ||
|
|
||
| error[E0599]: the method `as_deref` exists for enum `Result<{integer}, _>`, but its trait bounds were not satisfied | ||
| --> $DIR/option-result-as_deref.rs:8:22 | ||
| | | ||
| LL | let _o = &Ok(42).as_deref(); | ||
| | ^^^^^^^^ | ||
| | | ||
| = note: the following trait bounds were not satisfied: | ||
| `{integer}: Deref` | ||
|
|
||
| error[E0599]: the method `as_deref_mut` exists for enum `Result<{integer}, _>`, but its trait bounds were not satisfied | ||
| --> $DIR/option-result-as_deref.rs:10:26 | ||
| | | ||
| LL | let _w = &mut Ok(42).as_deref_mut(); | ||
| | ^^^^^^^^^^^^ | ||
| | | ||
| = note: the following trait bounds were not satisfied: | ||
| `{integer}: Deref` | ||
|
|
||
| error: aborting due to 4 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0599`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| //! Regression test for <https://github.com/rust-lang/rust/issues/41652>. | ||
| //! This used to ICE on empty string indexing internally, which came from | ||
| //! empty code span in error message, when method cannot be found. | ||
| //@ aux-build:no-method-empty-span.rs | ||
|
|
||
| extern crate no_method_empty_span; | ||
|
|
||
| struct S; | ||
|
|
||
| impl no_method_empty_span::Tr for S { | ||
| fn f() { | ||
| 3.f() | ||
| //~^ ERROR can't call method `f` on ambiguous numeric type `{integer}` | ||
| } | ||
| } | ||
|
|
||
| fn main() {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| //! Regression test for <https://github.com/rust-lang/rust/issues/50865>. | ||
| //! When using generics or specifying the type directly, this example | ||
| //! codegens `foo` internally. However, when using a private `impl Trait` | ||
| //! function which references another private item, `foo` (in this case) | ||
| //! wouldn't be codegenned until main.rs used `bar`, as with impl Trait | ||
| //! it is not cast to `fn()` automatically to satisfy e.g. | ||
| //! `fn foo() -> fn() { ... }`. | ||
| //@ run-pass | ||
| //@ aux-build:reachable-private-fn-codegen.rs | ||
|
|
||
|
|
||
| extern crate reachable_private_fn_codegen; | ||
|
|
||
| fn main() { | ||
| reachable_private_fn_codegen::bar(()); // Error won't happen if bar is called from same crate | ||
| } |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one is a lost duplicate of |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't error on const-eval anymore, so this doesn't test diagnostic quality
View changes since the review