-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Tidying up UI tests [5/N] #149411
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
Merged
Merged
Tidying up UI tests [5/N] #149411
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bfc0c02
Relocate macro_backtrace to macro and remove macro_backtrace
reddevilmidzy 58a802e
Relocate modules_ans_files_visibity/mod_file_correct_spans.rs to
reddevilmidzy 8e74c6b
Relocate modules_and_files_visibility/mod_file_disambig.rs to
reddevilmidzy aa97acc
Relocate qualified/qualified-path-params to
reddevilmidzy cd618a9
Merge missing_non_modrs with modules
reddevilmidzy ace4aeb
Merge `while` with `for-loop-while`
reddevilmidzy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...s/ui/while/while-let-scope-issue-40235.rs → tests/ui/for-loop-while/while-let-scope.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| //@ check-pass | ||
| // regression test for #40235 | ||
| #![allow(unused_variables)] | ||
| fn foo() {} | ||
|
|
||
|
|
||
10 changes: 5 additions & 5 deletions
10
tests/ui/macro_backtrace/auxiliary/ping.rs → tests/ui/macros/auxiliary/ping.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,30 @@ | ||
| // Test that the macro backtrace facility works (supporting file) | ||
| // Test that the macro backtrace facility works (supporting macro-backtrace-complex.rs) | ||
|
|
||
| // a non-local macro | ||
| #[macro_export] | ||
| macro_rules! ping { | ||
| () => { | ||
| pong!(); | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| #[macro_export] | ||
| macro_rules! deep { | ||
| () => { | ||
| foo!(); | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| #[macro_export] | ||
| macro_rules! foo { | ||
| () => { | ||
| bar!(); | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| #[macro_export] | ||
| macro_rules! bar { | ||
| () => { | ||
| ping!(); | ||
| } | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
tests/ui/macro_backtrace/main.rs → tests/ui/macros/macro-backtrace-complex.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.rs
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
tests/ui/missing_non_modrs_mod/foo.rs → tests/ui/modules/missing_mod.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| //@ ignore-auxiliary (used by `./missing_non_modrs_mod.rs`) | ||
|
|
||
| // looking for a file which does not exist. | ||
| mod missing; |
2 changes: 1 addition & 1 deletion
2
tests/ui/missing_non_modrs_mod/foo_inline.rs → tests/ui/modules/missing_mod_inline.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| //@ ignore-auxiliary (used by `./missing_non_modrs_mod_inline.rs`) | ||
|
|
||
| // looking for a file which does not exist. | ||
| mod inline { | ||
| mod missing; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| //! Tests the error reporting when a declared module file is missing. | ||
| mod missing_mod; | ||
| fn main() {} | ||
|
|
||
| //~? ERROR file not found for module `missing` |
4 changes: 2 additions & 2 deletions
4
...on_modrs_mod/missing_non_modrs_mod.stderr → ...s/ui/modules/missing_non_modrs_mod.stderr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| //! Tests the error reporting when a declared module file is missing. | ||
| mod missing_mod_inline; | ||
| fn main() {} | ||
|
|
||
| //~? ERROR file not found for module `missing` |
4 changes: 2 additions & 2 deletions
4
...s_mod/missing_non_modrs_mod_inline.stderr → ...dules/missing_non_modrs_mod_inline.stderr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| //@ ignore-auxiliary (used by `./mod_file_with_path_attr.rs` and `mod_file.rs`) | ||
| //@ ignore-auxiliary (used by `./mod_file_with_path_attr.rs` and `mod_file.rs` and `mod_file_correct_spans.rs`) | ||
| // ignore-tidy-linelength | ||
|
|
||
| pub fn foo() -> isize { 10 } |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| //! related issue <https://github.com/rust-lang/rust/issues/4116> | ||
|
|
||
| mod mod_file_disambig_aux; //~ ERROR file for module `mod_file_disambig_aux` found at both | ||
|
|
||
| fn main() {} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| error[E0761]: file for module `mod_file_disambig_aux` found at both "$DIR/mod_file_disambig_aux.rs" and "$DIR/mod_file_disambig_aux/mod.rs" | ||
| --> $DIR/mod_file_disambig.rs:3:1 | ||
| | | ||
| LL | mod mod_file_disambig_aux; | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | | ||
| = help: delete or rename one of them to remove the ambiguity | ||
|
|
||
| error: aborting due to 1 previous error | ||
|
|
||
| For more information about this error, try `rustc --explain E0761`. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
tests/ui/modules_and_files_visibility/mod_file_disambig.stderr
This file was deleted.
Oops, something went wrong.
Kivooeo marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| error[E0223]: ambiguous associated type | ||
| --> $DIR/qualified-path-params.rs:18:10 | ||
| | | ||
| LL | type A = <S as Tr>::A::f<u8>; | ||
| | ^^^^^^^^^^^^^^^^^^^ | ||
| | | ||
| help: if there were a trait named `Example` with associated type `f` implemented for `<S as Tr>::A`, you could use the fully-qualified path | ||
| | | ||
| LL - type A = <S as Tr>::A::f<u8>; | ||
| LL + type A = <<S as Tr>::A as Example>::f<u8>; | ||
| | | ||
|
|
||
| error[E0533]: expected unit struct, unit variant or constant, found associated function `<<S as Tr>::A>::f<u8>` | ||
| --> $DIR/qualified-path-params.rs:23:9 | ||
| | | ||
| LL | <S as Tr>::A::f::<u8> => {} | ||
| | ^^^^^^^^^^^^^^^^^^^^^ not a unit struct, unit variant or constant | ||
|
|
||
| error[E0029]: only `char` and numeric types are allowed in range patterns | ||
| --> $DIR/qualified-path-params.rs:25:13 | ||
| | | ||
| LL | 0..=<S as Tr>::A::f::<u8> => {} | ||
| | - ^^^^^^^^^^^^^^^^^^^^^ this is of type `fn() {S::f::<u8>}` but it should be `char` or numeric | ||
| | | | ||
| | this is of type `{integer}` | ||
|
|
||
| error: aborting due to 3 previous errors | ||
|
|
||
| Some errors have detailed explanations: E0029, E0223, E0533. | ||
| For more information about an error, try `rustc --explain E0029`. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
original
a74d92e
The assert_eq statement here seems unnecessary, so I removed it.