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

stability lint: check stability of macro uses, check bodies at def site #15728

Closed
aturon opened this issue Jul 16, 2014 · 6 comments
Closed

stability lint: check stability of macro uses, check bodies at def site #15728

aturon opened this issue Jul 16, 2014 · 6 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-stability Area: `#[stable]`, `#[unstable]` etc. C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@aturon
Copy link
Member

aturon commented Jul 16, 2014

The stability infrastructure should apply to macros in two ways:

  • It should be possible to provide a stability level for a macro definition. This should trigger the lint on any use of the macro.
  • The body of a macro should be linted at the definition site.

Of the two, the first is much more important. But it may require additional infrastructure in the AST to track e.g. the def_id of the macro that was expanded. (Currently, the expansion span information tracks only the name and source location of the macro.)

@alexcrichton
Copy link
Member

cc #15703

@huonw
Copy link
Member

huonw commented Feb 28, 2015

cc #17316

@steveklabnik
Copy link
Member

Triage: i am unaware of significant changes to any of this in a long time.

@Mark-Simulacrum
Copy link
Member

Since, for example, select! is unstable, I think this is at least partially fixed. I think that the second item on the list isn't done, but I'm also not entirely sure what it means.

@Mark-Simulacrum Mark-Simulacrum added A-stability Area: `#[stable]`, `#[unstable]` etc. A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Jun 22, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 21, 2017
@steveklabnik
Copy link
Member

Triage: still no changes, but I'm also not aware of any plans to change this. Closing.

@petrochenkov
Copy link
Contributor

The first item is fixed, the second item is mitigated by #[allow_internal_unstable].

bors added a commit to rust-lang-ci/rust that referenced this issue Nov 13, 2023
…tion_vscode, r=Veykril

feat: vscode: Support opening local documentation if available

This PR implements the VS code support for opening local documentation (server side support was already implemented in rust-lang#14662).

[local_docs.webm](https://github.com/rust-lang/rust-analyzer/assets/9659253/715b84dd-4f14-4ba0-a904-749b847eb3d5)

Displaying local instead of web docs can have many benefits:
- the web version may have different features enabled than locally selected
- the standard library may be a different version than is available online
- the user may not be online and therefore cannot access the web documentation
- the documentation may not be available online at all, for example because it is for a new feature in a library the user is currently developing

If the documentation is not available locally, the extension still falls back to the web version.

Closes rust-lang#12867.

-----

If my implementation isn't really idiomatic TypeScript: Sorry, I'm not much of a TypeScript developer. I am open to feedback, however.
@fmease fmease added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Dec 21, 2024
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. A-stability Area: `#[stable]`, `#[unstable]` etc. C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

7 participants