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.
Remove untracked vtable-const-allocation cache from tcx
- Loading branch information
1 parent
a479766
commit a1e2c0f
Showing
3 changed files
with
29 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// revisions:rpass1 rpass2 | ||
|
||
trait Foo { | ||
#[cfg(rpass1)] | ||
fn method1(&self) -> u32; | ||
|
||
fn method2(&self) -> u32; | ||
|
||
#[cfg(rpass2)] | ||
fn method1(&self) -> u32; | ||
} | ||
|
||
impl Foo for u32 { | ||
fn method1(&self) -> u32 { 17 } | ||
fn method2(&self) -> u32 { 42 } | ||
} | ||
|
||
fn main() { | ||
let x: &dyn Foo = &0u32; | ||
assert_eq!(mod1::foo(x), 17); | ||
} | ||
|
||
mod mod1 { | ||
pub fn foo(x: &dyn super::Foo) -> u32 { | ||
x.method1() | ||
} | ||
} |