forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Audit uses of
tool_only_span_suggestion
- Loading branch information
Showing
7 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
14 changes: 14 additions & 0 deletions
14
src/test/ui/parser/issue-67146-negative-outlives-bound-syntactic-fail.fixed
This file contains 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 @@ | ||
// run-rustfix | ||
|
||
// In this regression test for #67146, we check that the | ||
// negative outlives bound `!'a` is rejected by the parser. | ||
// This regression was first introduced in PR #57364. | ||
|
||
fn main() {} | ||
|
||
pub fn f1<T>() {} | ||
//~^ ERROR negative bounds are not supported | ||
pub fn f2<'a, T: Ord>() {} | ||
//~^ ERROR negative bounds are not supported | ||
pub fn f3<'a, T: Ord>() {} | ||
//~^ ERROR negative bounds are not supported |
8 changes: 5 additions & 3 deletions
8
src/test/ui/parser/issue-67146-negative-outlives-bound-syntactic-fail.rs
This file contains 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,12 +1,14 @@ | ||
// run-rustfix | ||
|
||
// In this regression test for #67146, we check that the | ||
// negative outlives bound `!'a` is rejected by the parser. | ||
// This regression was first introduced in PR #57364. | ||
|
||
fn main() {} | ||
|
||
fn f1<T: !'static>() {} | ||
pub fn f1<T: !'static>() {} | ||
//~^ ERROR negative bounds are not supported | ||
fn f2<'a, T: Ord + !'a>() {} | ||
pub fn f2<'a, T: Ord + !'a>() {} | ||
//~^ ERROR negative bounds are not supported | ||
fn f3<'a, T: !'a + Ord>() {} | ||
pub fn f3<'a, T: !'a + Ord>() {} | ||
//~^ ERROR negative bounds are not supported |
18 changes: 9 additions & 9 deletions
18
src/test/ui/parser/issue-67146-negative-outlives-bound-syntactic-fail.stderr
This file contains 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,20 +1,20 @@ | ||
error: negative bounds are not supported | ||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:7:8 | ||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:9:12 | ||
| | ||
LL | fn f1<T: !'static>() {} | ||
| ^^^^^^^^^^ negative bounds are not supported | ||
LL | pub fn f1<T: !'static>() {} | ||
| ^^^^^^^^^^ negative bounds are not supported | ||
|
||
error: negative bounds are not supported | ||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:9:18 | ||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:11:22 | ||
| | ||
LL | fn f2<'a, T: Ord + !'a>() {} | ||
| ^^^^^ negative bounds are not supported | ||
LL | pub fn f2<'a, T: Ord + !'a>() {} | ||
| ^^^^^ negative bounds are not supported | ||
|
||
error: negative bounds are not supported | ||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:11:12 | ||
--> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:13:16 | ||
| | ||
LL | fn f3<'a, T: !'a + Ord>() {} | ||
| ^^^^^ negative bounds are not supported | ||
LL | pub fn f3<'a, T: !'a + Ord>() {} | ||
| ^^^^^ negative bounds are not supported | ||
|
||
error: aborting due to 3 previous errors | ||
|
This file contains 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,9 @@ | ||
// run-rustfix | ||
|
||
#[allow(unused_imports)] | ||
use std::mem::transmute; | ||
|
||
//~^ ERROR the name `transmute` is defined multiple times | ||
|
||
fn main() { | ||
} |
This file contains 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 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