-
Notifications
You must be signed in to change notification settings - Fork 13.5k
tests/ui
: A New Order [26/N]
#143301
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
+271
−207
Merged
tests/ui
: A New Order [26/N]
#143301
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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
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
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
2 changes: 1 addition & 1 deletion
2
tests/ui/tag-variant-cast-non-nullary.stderr → .../cast/cast-enum-to-primitive-error.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
4 changes: 3 additions & 1 deletion
4
tests/ui/trivial_casts-rpass.rs → tests/ui/cast/coercion-as-explicit-cast.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
2 changes: 1 addition & 1 deletion
2
tests/ui/trivial_casts-rpass.stderr → .../ui/cast/coercion-as-explicit-cast.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,15 @@ | ||
//! This test checks that unused generics are rejected by compiler | ||
enum Quux<T> { | ||
//~^ ERROR: parameter `T` is never used | ||
Bar, | ||
} | ||
|
||
fn foo(c: Quux) { | ||
//~^ ERROR missing generics for enum `Quux` | ||
assert!((false)); | ||
} | ||
|
||
fn main() { | ||
panic!(); | ||
} |
14 changes: 7 additions & 7 deletions
14
tests/ui/tag-type-args.stderr → tests/ui/generics/generic-enum-errors.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,16 @@ | ||
//! Check path resolution using `super` | ||
//@ run-pass | ||
|
||
#![allow(dead_code)] | ||
|
||
pub mod a { | ||
pub fn f() {} | ||
pub mod b { | ||
fn g() { | ||
super::f(); // Accessing `f` from module `a` (parent of `b`) | ||
} | ||
} | ||
} | ||
|
||
pub 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,6 @@ | ||
//! Check that `super` keyword used at the crate root (top-level) results in a compilation error | ||
//! as there is no parent module to resolve. | ||
use super::f; //~ ERROR there are too many leading `super` keywords | ||
|
||
fn main() {} |
2 changes: 1 addition & 1 deletion
2
tests/ui/super-at-top-level.stderr → tests/ui/modules/super-at-crate-root.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
8 changes: 8 additions & 0 deletions
8
tests/ui/trailing-comma.rs → tests/ui/parser/syntactic-trailing-commas.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 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,14 @@ | ||
//! Check the basic functionality of `std::mem::swap` to ensure it correctly | ||
//! exchanges the values of two mutable variables. | ||
|
||
//@ run-pass | ||
|
||
use std::mem::swap; | ||
|
||
pub fn main() { | ||
let mut x = 3; | ||
let mut y = 7; | ||
swap(&mut x, &mut y); | ||
assert_eq!(x, 7); | ||
assert_eq!(y, 3); | ||
} |
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,15 @@ | ||
//! This test verifies that tail call optimization does not lead to argument slot leaks. | ||
//! | ||
//! Regression test for: <https://github.com/rust-lang/rust/issues/160> | ||
|
||
//@ run-pass | ||
|
||
fn inner(dummy: String, b: bool) { | ||
if b { | ||
return inner(dummy, false); | ||
} | ||
} | ||
|
||
pub fn main() { | ||
inner("hi".to_string(), true); | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.