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

#![no_start] attribute emits false root module warning #43144

Closed
pnkfelix opened this issue Jul 10, 2017 · 1 comment · Fixed by #64471
Closed

#![no_start] attribute emits false root module warning #43144

pnkfelix opened this issue Jul 10, 2017 · 1 comment · Fixed by #64471
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@pnkfelix
Copy link
Member

(Spawned off of issue #43106)

Compiling this code (in stable/beta/nightly) results in the following compiler warnings:

#![no_start]
fn main() { }

warnings:

warning: unused attribute
 --> <anon>:1:1
  |
1 | #![no_start]
  | ^^^^^^^^^^^^
  |
  = note: #[warn(unused_attributes)] on by default

warning: crate-level attribute should be in the root module
 --> <anon>:1:1
  |
1 | #![no_start]
  | ^^^^^^^^^^^^
  |
  = note: #[warn(unused_attributes)] on by default

Similarly to #43142, the warning that a crate-level attribute should be in the root module is false here: This attribute is in the root module.


(I suspect that #[no_start], like #[crate_id="..."], is simply totally unused at this point, and our infrastructure for warning about crate-level attributes in the wrong place in the AST is somehow mistakenly coupled to the unused_attribute analysis.)

@Mark-Simulacrum Mark-Simulacrum added the A-diagnostics Area: Messages for errors, warnings, and lints label Jul 19, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 26, 2017
bors bot added a commit to tock/tock that referenced this issue Dec 12, 2018
1250: doc: clean up rustdoc warnings r=alevy a=ppannuto

### Pull Request Overview

Doc-only changes that clean up some warnings in the rustdoc runs.

### Testing Strategy

This pull request was tested by compiling.

### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make formatall`.

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

There's still one set of warnings generated for each board, but that appears to be a known bug rather than a real issue: rust-lang/rust#43144

Co-authored-by: Pat Pannuto <pat.pannuto@gmail.com>
@ppannuto
Copy link

Any headway on this issue? We'd like to enable warnings-as-errors for CI builds on Tock, but this warning is currently generated for every platform.

@bors bors closed this as completed in 3e4c778 Sep 15, 2019
lschuermann pushed a commit to lschuermann/tock-registers that referenced this issue Dec 18, 2021
1250: doc: clean up rustdoc warnings r=alevy a=ppannuto

### Pull Request Overview

Doc-only changes that clean up some warnings in the rustdoc runs.

### Testing Strategy

This pull request was tested by compiling.

### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make formatall`.

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

There's still one set of warnings generated for each board, but that appears to be a known bug rather than a real issue: rust-lang/rust#43144

Co-authored-by: Pat Pannuto <pat.pannuto@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants