-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
21 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
21 changes: 21 additions & 0 deletions
21
src/test/ui/parser/issue-68788-in-trait-item-propagation.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Make sure we don't propagate restrictions on trait impl items to items inside them. | ||
|
||
// check-pass | ||
// edition:2018 | ||
|
||
fn main() {} | ||
|
||
trait X { | ||
fn foo(); | ||
} | ||
|
||
impl X for () { | ||
fn foo() { | ||
struct S; | ||
impl S { | ||
pub const X: u8 = 0; | ||
pub const fn bar() {} | ||
async fn qux() {} | ||
} | ||
} | ||
} |