You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/assoc-lang-items.rs
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,17 @@
1
+
//! Check that associated items can be marked as lang items, so that they don't have to be looked up
2
+
//! by name or by definition order indirectly.
3
+
//!
4
+
//! This test is not *quite* high-fidelity: it checks that you can use lang items on associated
5
+
//! items by looking at the error message *as a proxy*. That is, the error message is about
6
+
//! undefined lang items and not invalid attribute target, indicating that it has reached lang item
7
+
//! machinery (which is relying on knowing the implementation detail). However, it's annoying to
8
+
//! write a full-fidelity test for this, so I think this is acceptable even though it's not *great*.
9
+
//!
10
+
//! This was implemented in <https://github.com/rust-lang/rust/pull/72559> to help with
11
+
//! <https://github.com/rust-lang/rust/issues/70718>, which is itself relevant for e.g. `Fn::Output`
12
+
//! or `Future::Output` or specific use cases like [Use `T`'s discriminant type in
13
+
//! `mem::Discriminant<T>` instead of `u64`](https://github.com/rust-lang/rust/pull/70705).
0 commit comments