Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert lifetime shadowing into a hard error, as promised. #24057

Merged
merged 2 commits into from
Apr 7, 2015

Conversation

nikomatsakis
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@Manishearth
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 4, 2015

📌 Commit 48a023c has been approved by Manishearth

@huonw
Copy link
Member

huonw commented Apr 4, 2015

Will tests need updating?

@bors
Copy link
Contributor

bors commented Apr 4, 2015

⌛ Testing commit 48a023c with merge 4ca7d49...

@bors
Copy link
Contributor

bors commented Apr 4, 2015

💔 Test failed - auto-mac-32-opt

@Manishearth
Copy link
Member

Nope.


failures:

---- [run-pass] run-pass/overloaded-index-assoc-list.rs stdout ----

error: compilation failed!
status: exit code: 101
command: i686-apple-darwin/stage2/bin/rustc /Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/test/run-pass/overloaded-index-assoc-list.rs -L i686-apple-darwin/test/run-pass/ --target=i686-apple-darwin -L i686-apple-darwin/test/run-pass/overloaded-index-assoc-list.stage2-i686-apple-darwinlibaux -C prefer-dynamic -o i686-apple-darwin/test/run-pass/overloaded-index-assoc-list.stage2-i686-apple-darwin --cfg rtopt --cfg debug -O -L i686-apple-darwin/rt
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/test/run-pass/overloaded-index-assoc-list.rs:38:14: 38:16 error: lifetime name `'a` shadows another lifetime name that is already in scope
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/test/run-pass/overloaded-index-assoc-list.rs:38     fn index<'a>(&'a self, index: &K) -> &'a V {
                                                                                                                                ^~
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/test/run-pass/overloaded-index-assoc-list.rs:35:6: 35:8 note: shadowed lifetime `'a` declared here
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/test/run-pass/overloaded-index-assoc-list.rs:35 impl<'a, K: PartialEq + std::fmt::Debug, V:Clone> Index<&'a K> for AssociationList<K,V> {
                                                                                                                        ^~
error: aborting due to previous error

------------------------------------------

thread '[run-pass] run-pass/overloaded-index-assoc-list.rs' panicked at 'explicit panic', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/compiletest/runtest.rs:1482

@nikomatsakis
Copy link
Contributor Author

Grr. I though make check passed locally...must be I got confused.

@nikomatsakis
Copy link
Contributor Author

Ah, I only make make all. D'oh!

@nikomatsakis
Copy link
Contributor Author

@bors r=huon rollup 49f2a56

@bors
Copy link
Contributor

bors commented Apr 6, 2015

📌 Commit 49f2a56 has been approved by huon

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 7, 2015
@bors bors merged commit 49f2a56 into rust-lang:master Apr 7, 2015
@bluss
Copy link
Member

bluss commented Apr 8, 2015

This should have been marked [breaking-change], right? Just reminding, so that we get this right next time.

@nikomatsakis
Copy link
Contributor Author

On Wed, Apr 08, 2015 at 04:26:16AM -0700, bluss wrote:

This should have been marked [breaking-change], right? Just reminding, so that we get this right.

Indeed, my bad.

@nikomatsakis nikomatsakis deleted the lifetime-shadowing-hard-error branch March 30, 2016 16:16
Sign up for free to 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.

6 participants