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

Tracking issue for RFC 459 - Disallow type/lifetime parameter shadowing #19390

Closed
nrc opened this issue Nov 29, 2014 · 4 comments
Closed

Tracking issue for RFC 459 - Disallow type/lifetime parameter shadowing #19390

nrc opened this issue Nov 29, 2014 · 4 comments

Comments

@nrc
Copy link
Member

nrc commented Nov 29, 2014

discussion

cc @nikomatsakis

@nrc
Copy link
Member Author

nrc commented Nov 29, 2014

rendered RFC

bors added a commit that referenced this issue Dec 16, 2014
per rfc 459
cc #19390

One question is: should we start by warning, and only switch to hard error later? I think we discussed something like this in the meeting. 

r? @alexcrichton
@huonw
Copy link
Member

huonw commented Jan 7, 2015

It seems like the second part of this (type parameter shadowing) is backwards incompatible, but AFAICT, isn't implemented yet.

@nrc
Copy link
Member Author

nrc commented Jan 7, 2015

I suggest we leave it and go straight for the lint (as we plan to do eventually with the lifetime version). Then no backwards compatibility issues. Also, since type shadowing is allowed in every other language it is going to really surprise people if it is forbidden in Rust. And, it is the shadowed lifetimes which were causing the motivating confusion.

@huonw huonw closed this as completed in 92cd8ea Jan 8, 2015
@mrhota
Copy link
Contributor

mrhota commented Jan 21, 2018

just for future visitors, type parameter shadowing (like the example in the RFC) does, in fact, produce a clear compiler error.

The comments above and lack of linked "type parameter shadowing" PRs might otherwise suggest that type parameter shadowing was left as a lint rather than a compiler error.

spikespaz pushed a commit to spikespaz/dotwalk-rs that referenced this issue Aug 29, 2024
per rfc 459
cc rust-lang/rust#19390

One question is: should we start by warning, and only switch to hard error later? I think we discussed something like this in the meeting. 

r? @alexcrichton
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

No branches or pull requests

3 participants