-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address nits, rename enclosing_scope => parent_label
- Loading branch information
1 parent
c23fe81
commit edba0c9
Showing
7 changed files
with
141 additions
and
65 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
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
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 was deleted.
Oops, something went wrong.
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,27 @@ | ||
// Test scope annotations from `parent_label` parameter | ||
|
||
#![feature(rustc_attrs)] | ||
|
||
#[rustc_on_unimplemented(parent_label = "in this scope")] | ||
trait Trait {} | ||
|
||
struct Foo; | ||
|
||
fn f<T: Trait>(x: T) {} | ||
|
||
fn main() { | ||
let x = || { | ||
f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | ||
let y = || { | ||
f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | ||
}; | ||
}; | ||
|
||
{ | ||
{ | ||
f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | ||
} | ||
} | ||
|
||
f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | ||
} |
32 changes: 16 additions & 16 deletions
32
...i/on-unimplemented/enclosing-scope.stderr → ...t/ui/on-unimplemented/parent-label.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