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

unused lang items do not trigger lint #30881

Closed
durka opened this issue Jan 13, 2016 · 2 comments
Closed

unused lang items do not trigger lint #30881

durka opened this issue Jan 13, 2016 · 2 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@durka
Copy link
Contributor

durka commented Jan 13, 2016

See playpen.

It seems like #[lang = "foo"], where there is no such lang item "foo", should trigger unused_attributes.

@sanxiyn sanxiyn added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Jan 14, 2016
@sfackler
Copy link
Member

Dup of #14406 I believe.

@durka
Copy link
Contributor Author

durka commented Jan 14, 2016

Yep.

@durka durka closed this as completed Jan 14, 2016
durka added a commit to durka/rust that referenced this issue Jan 27, 2016
The range desugaring does not use the lang items. Hence I did not add
lang items for inclusive ranges. This cleanup commit removes the old
unused ones as well.

Whether the desugaring _should_ use lang items is another question:
see rust-lang#30809. But if we decide on a strategy there we can add back these
lang items, and new ones for inclusive ranges.

For stage0 we need to keep the attributes as the lang items still exist
even if they are never used.

This is surprisingly not a breaking change. Unused #[lang] attributes do
not even trigger a lint (see rust-lang#30881).
durka added a commit to durka/rust that referenced this issue Jan 27, 2016
The range desugaring does not use the lang items. Hence I did not add
lang items for inclusive ranges. This cleanup commit removes the old
unused ones as well.

Whether the desugaring _should_ use lang items is another question:
see rust-lang#30809. But if we decide on a strategy there we can add back these
lang items, and new ones for inclusive ranges.

For stage0 we need to keep the attributes as the lang items still exist
even if they are never used.

This is surprisingly not a breaking change. Unused #[lang] attributes do
not even trigger a lint (see rust-lang#30881).
durka added a commit to durka/rust that referenced this issue Feb 27, 2016
The range desugaring does not use the lang items. Hence I did not add
lang items for inclusive ranges. This cleanup commit removes the old
unused ones as well.

Whether the desugaring _should_ use lang items is another question:
see rust-lang#30809. But if we decide on a strategy there we can add back these
lang items, and new ones for inclusive ranges.

For stage0 we need to keep the attributes as the lang items still exist
even if they are never used.

This is surprisingly not a breaking change. Unused #[lang] attributes do
not even trigger a lint (see rust-lang#30881).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

3 participants