Skip to content

Fix issue #5121: Add proper support for early/late distinction for lifetime bindings - #12807

Merged
bors merged 6 commits into
rust-lang:masterfrom
pnkfelix:fsk-issue5121-fns-with-early-lifetime-params
Mar 12, 2014
Merged

Fix issue #5121: Add proper support for early/late distinction for lifetime bindings#12807
bors merged 6 commits into
rust-lang:masterfrom
pnkfelix:fsk-issue5121-fns-with-early-lifetime-params

Conversation

@pnkfelix

Copy link
Copy Markdown
Contributor

Fix issue #5121: Add proper support for early/late distinction for lifetime bindings.

There are some little refactoring cleanups as separate commits; the real meat that has the actual fix is in the final commit.

The original author of the work was @nikomatsakis; I have reviewed it, revised it slightly, refactored it into these separate commits, and done some rebasing work.

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

Super weird, why don't I see these resolve problems on my own builds? (I did a make check yesterday and a make check-fast today, hmm...)

oxidize: x86_64-unknown-linux-gnu/stage2/test/syntaxtest-x86_64-unknown-linux-gnu
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ast_util.rs:696:33: 696:41 error: unresolved name
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ast_util.rs:696 lifetimes: Vec::new(),
^~~~~~~~
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ast_util.rs:696:33: 696:41 error: use of undeclared module `Vec`
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ast_util.rs:696 lifetimes: Vec::new(),
^~~~~~~~
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ast_util.rs:696:33: 696:41 error: unresolved name `Vec::new`.
/home/rustbuild/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ast_util.rs:696 lifetimes: Vec::new(),
^~~~~~~~
error: aborting due to 3 previous errors

Update: well, i can reproduce the above problem locally, so I must have just been sloppy with my earlier local make check runs.

There is a broader revision (that does this across the board) pending
in rust-lang#12675, but that is awaiting the arrival of more data (to decide
whether to keep OptVec alive by using a non-Vec internally).
For this code, the representation of lifetime lists needs to be the
same in both ScopeChain and in the ast and ty structures. So it
seemed cleanest to just use `vec_ng::Vec`, now that it has a cheaper
empty representation than the current `vec` code.
Uses newly added Vec::partition method to simplify resolve_lifetime.
bors added a commit that referenced this pull request Mar 12, 2014
…etime-params, r=pnkfelix
Fix issue #5121: Add proper support for early/late distinction for lifetime bindings.
There are some little refactoring cleanups as separate commits; the real meat that has the actual fix is in the final commit.
The original author of the work was @nikomatsakis; I have reviewed it, revised it slightly, refactored it into these separate commits, and done some rebasing work.
@borsbors closed this Mar 12, 2014
@bors
bors merged commit 742e458 into rust-lang:masterMar 12, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
…ykril
Add simple support for completion item details
Supercedes rust-lang/rust-analyzer#9891
This doesn't yet really implement anything new, it just adds the scaffolding for the protocol conversion
bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
…s, r=y21
Suppress `iter_on_empty_collections` if the iterator's concrete type is relied upon
changelog: fixedrust-lang#12807
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pnkfelix@bors