-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Tidying up tests/ui/issues tests [3/N] #149676
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
base: main
Are you sure you want to change the base?
Changes from all commits
c2e43ff
d66125e
9c52ff9
be70b13
73ef996
6f0b57a
39572c7
4959cb1
b832582
b929f66
63063a0
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,8 @@ | ||
| //! regression test for issue #1895 | ||
| //@ run-pass | ||
|
|
||
| fn main() { | ||
| let x = 1_usize; | ||
| let y = || x; | ||
| let _z = y(); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| //! regression test for issue #2642 | ||
| //@ run-pass | ||
| #![allow(dead_code)] | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| //! regression test for issue #47673 | ||
| //@ check-pass | ||
| #![allow(unused_imports)] | ||
|
|
||
|
|
||
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.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| //! regression test for issue #3500 | ||
| //@ run-pass | ||
|
|
||
| pub fn main() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| //! regression test for issue #3993 | ||
|
|
||
| mod a { | ||
| fn f() {} | ||
| } | ||
|
|
||
| fn main() { | ||
| a::f(); //~ ERROR function `f` is private | ||
| } | ||
|
|
||
| fn foo() { | ||
| use a::f; //~ ERROR function `f` is private | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,27 @@ | ||
| error[E0603]: function `f` is private | ||
| --> $DIR/private-item-simple.rs:6:8 | ||
| --> $DIR/private-item-simple.rs:12:12 | ||
| | | ||
| LL | use a::f; | ||
| | ^ private function | ||
| | | ||
| note: the function `f` is defined here | ||
| --> $DIR/private-item-simple.rs:4:5 | ||
| | | ||
| LL | fn f() {} | ||
| | ^^^^^^ | ||
|
|
||
| error[E0603]: function `f` is private | ||
| --> $DIR/private-item-simple.rs:8:8 | ||
| | | ||
| LL | a::f(); | ||
| | ^ private function | ||
| | | ||
| note: the function `f` is defined here | ||
| --> $DIR/private-item-simple.rs:2:5 | ||
| --> $DIR/private-item-simple.rs:4:5 | ||
| | | ||
| LL | fn f() {} | ||
| | ^^^^^^ | ||
|
|
||
| error: aborting due to 1 previous error | ||
| error: aborting due to 2 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0603`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| //! regression test for issue #47377, #47380 | ||
| // ignore-tidy-tab | ||
| fn main() { | ||
| let b = "hello"; | ||
| let _a = b + ", World!"; | ||
| //~^ ERROR E0369 | ||
|
|
||
| let b = "hello"; | ||
| println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; | ||
| //~^ ERROR E0369 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,30 @@ | ||
| //@ run-pass | ||
| // regression test for issue #50825 | ||
| // Check that the feature gate normalizes associated types. | ||
| //! regression test for issue #50825, #51044 | ||
| //! Check that the feature gate normalizes associated types. | ||
|
|
||
| #![allow(dead_code)] | ||
| struct Foo<T>(T); | ||
| struct Duck; | ||
| struct Quack; | ||
|
|
||
| trait Hello<A> where A: Animal { | ||
| trait Hello<A> | ||
| where | ||
| A: Animal, | ||
| { | ||
| } | ||
|
|
||
| trait Animal { | ||
| type Noise; | ||
| } | ||
|
|
||
| trait Loud<R> { | ||
| } | ||
| trait Loud<R> {} | ||
|
|
||
| impl Loud<Quack> for f32 { | ||
| } | ||
| impl Loud<Quack> for f32 {} | ||
|
|
||
| impl Animal for Duck { | ||
| type Noise = Quack; | ||
| } | ||
|
|
||
| impl Hello<Duck> for Foo<f32> where f32: Loud<<Duck as Animal>::Noise> { | ||
| } | ||
| impl Hello<Duck> for Foo<f32> where f32: Loud<<Duck as Animal>::Noise> {} | ||
|
|
||
| fn main() {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //! regression test for issue #2151 | ||
|
|
||
| fn main() { | ||
| let x = panic!(); //~ ERROR type annotations needed | ||
| x.clone(); | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| //! Regression test for issue #10969, #22468 | ||
|
|
||
| fn main() { | ||
| let foo = "bar"; | ||
| let x = foo("baz"); | ||
| //~^ ERROR: expected function, found `&str` | ||
|
|
||
| let i = 0i32; | ||
| i(); | ||
| //~^ ERROR expected function, found `i32` | ||
| } | ||
|
|
||
| fn foo(file: &str) -> bool { | ||
| true | ||
| } | ||
|
|
||
| fn func(i: i32) { | ||
| i(); //~ERROR expected function, found `i32` | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| error[E0618]: expected function, found `&str` | ||
| --> $DIR/non-function-call-error.rs:5:13 | ||
| | | ||
| LL | let foo = "bar"; | ||
| | --- `foo` has type `&str` | ||
| LL | let x = foo("baz"); | ||
| | ^^^------- | ||
| | | | ||
| | call expression requires function | ||
| ... | ||
| LL | fn foo(file: &str) -> bool { | ||
| | -------------------------- this function of the same name is available here, but it's shadowed by the local binding | ||
|
|
||
| error[E0618]: expected function, found `i32` | ||
| --> $DIR/non-function-call-error.rs:9:5 | ||
| | | ||
| LL | let i = 0i32; | ||
| | - `i` has type `i32` | ||
| LL | i(); | ||
| | ^-- | ||
| | | | ||
| | call expression requires function | ||
|
|
||
| error[E0618]: expected function, found `i32` | ||
| --> $DIR/non-function-call-error.rs:18:5 | ||
| | | ||
| LL | fn func(i: i32) { | ||
| | - `i` has type `i32` | ||
| LL | i(); | ||
| | ^-- | ||
| | | | ||
| | call expression requires function | ||
|
|
||
| error: aborting due to 3 previous errors | ||
|
|
||
| For more information about this error, try `rustc --explain E0618`. |
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 test was previously named issue-3429. However, this test appears to be unrelated to issue #3429
The name was changed in this commit, c75b763, but I'm not sure why.
So I reverted it back to the original issue number. #1895