mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 05:13:35 +00:00
Use correct crate for trait env in render_const_scalar()
This commit is contained in:
parent
2fc0dc0f13
commit
422213cc9a
2 changed files with 7 additions and 5 deletions
|
|
@ -10950,8 +10950,12 @@ pub struct ManuallyDrop$0<T: ?Sized> {
|
|||
|
||||
#[test]
|
||||
fn projection_const() {
|
||||
// This uses two crates, which have *no* relation between them, to test another thing:
|
||||
// `render_const_scalar()` used to just use the last crate for the trait env, which will
|
||||
// fail in this scenario.
|
||||
check(
|
||||
r#"
|
||||
//- /foo.rs crate:foo
|
||||
pub trait PublicFlags {
|
||||
type Internal;
|
||||
}
|
||||
|
|
@ -10967,12 +10971,13 @@ pub struct InternalBitFlags;
|
|||
impl PublicFlags for NoteDialects {
|
||||
type Internal = InternalBitFlags;
|
||||
}
|
||||
//- /bar.rs crate:bar
|
||||
"#,
|
||||
expect![[r#"
|
||||
*CLAP*
|
||||
|
||||
```rust
|
||||
ra_test_fixture::NoteDialects
|
||||
foo::NoteDialects
|
||||
```
|
||||
|
||||
```rust
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue