Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 792c645

Browse files
committedAug 17, 2020
Auto merge of #75145 - davidtwco:issue-60607-preallocate-defid-for-lang-items, r=petrochenkov
Reference lang items during AST lowering Fixes #60607 and fixes #61019. This PR introduces `QPath::LangItem` to the HIR and uses it in AST lowering instead of constructing a `hir::Path` from a slice of symbols: - Credit for much of this work goes to @matthewjasper, I basically just [rebased their earlier work](matthewjasper@a227c70#diff-c0f791ead38d2d02916faaad0f56f41d). - ~~Changes to Clippy might not be correct, they compile but attempting to run tests through `./x.py` produced failures which appeared spurious, so I didn't run any clippy tests.~~ - Changes to save analysis might not be correct - tests pass but I don't have a lot of confidence in those changes being correct. - I've used `GenericBounds::LangItemTrait` rather than changing `PolyTraitRef`, as suggested by @matthewjasper [in this comment](matthewjasper@a227c70#r40107992) but I'd prefer that be left for a follow-up. - I've split things into smaller commits fairly arbitrarily to make the diff easier to review, each commit should compile but might not pass tests until the final commit. r? @oli-obk cc @matthewjasper
2 parents 33c96b4 + f1ce294 commit 792c645

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+588
-458
lines changed
 

‎library/core/src/convert/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ pub trait Into<T>: Sized {
385385
))]
386386
pub trait From<T>: Sized {
387387
/// Performs the conversion.
388+
#[cfg_attr(not(bootstrap), lang = "from")]
388389
#[stable(feature = "rust1", since = "1.0.0")]
389390
fn from(_: T) -> Self;
390391
}

‎library/core/src/future/future.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub trait Future {
9696
/// [`Context`]: ../task/struct.Context.html
9797
/// [`Waker`]: ../task/struct.Waker.html
9898
/// [`Waker::wake`]: ../task/struct.Waker.html#method.wake
99+
#[cfg_attr(not(bootstrap), lang = "poll")]
99100
#[stable(feature = "futures_api", since = "1.36.0")]
100101
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
101102
}

0 commit comments

Comments
 (0)
Please sign in to comment.