| Age | Commit message (Collapse) | Author | Lines |
|
Support stability and deprecation checking for all macros
RELNOTES: Deprecation attributes on macros now have effect.
Fixes https://github.com/rust-lang/rust/issues/34079
Fixes https://github.com/rust-lang/rust/issues/49912
Unblocks https://github.com/rust-lang/rust/pull/62086
Unblocks https://github.com/rust-lang/rust/pull/61000
|
|
They always end up interned anyway
|
|
|
|
Now that procedural macros no longer link transitively to libsyntax,
this shouldn't be needed any more! This commit is an experiment in
removing all dynamic libraries from rustc except for librustc_driver
itself. Let's see how far we can get with that!
|
|
Implement another internal lints
cc #49509
This adds ~~two~~ one internal lint~~s~~:
1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669
2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~
~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~
TODO (not directly relevant for review):
- [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb)
- [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870
- [x] Check explicitly for the `{declare,impl}_lint_pass!` macros
r? @oli-obk
|
|
|
|
|
|
|
|
|
|
The errors are either:
- The meta-variable used in the right-hand side is not bound (or defined) in the
left-hand side.
- The meta-variable used in the right-hand side does not repeat with the same
kleene operator as its binder in the left-hand side. Either it does not repeat
enough, or it uses a different operator somewhere.
This change should have no semantic impact.
|
|
Improve the explicit_outlives_requirements lint
* Don't use Strings to compare parameters
* Extend the lint to lifetime bounds
* Extend the lint to enums and unions
* Use the correct span for where clauses in tuple structs
* Try to early-out where possible
* Remove unnecessary bounds in rustc crates
|
|
syntax: Factor out common fields from `SyntaxExtension` variants
And some other related cleanups.
Continuation of https://github.com/rust-lang/rust/pull/61606.
This will also help to unblock https://github.com/rust-lang/rust/pull/61877.
|
|
Also give them a span in the HIR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Allow attributes in formal function parameters
Implements https://github.com/rust-lang/rust/issues/60406.
This is my first contribution to the compiler and since this is a large and complex project, I am not fully aware of the consequences of the changes I have made.
**TODO**
- [x] Forbid some built-in attributes.
- [x] Expand cfg/cfg_attr
|
|
r=oli-obk,Centril
use pattern matching for slices destructuring
refs #61542
Use slices pattern where it seems to make sense .
|
|
Use Symbol, Span in libfmt_macros
I'm not super happy with this, personally, but I think it might be a decent start -- happy to take suggestions as to how to expand this or change things further.
r? @estebank
Fixes #60795
|
|
Rollup of 11 pull requests
Successful merges:
- #61518 (Add loops to doc list of things not stable in const fn)
- #61526 (move some tests into subfolders)
- #61550 (Windows 10 SDK is also required now.)
- #61606 (Remove some legacy proc macro flavors)
- #61652 (Mention slice patterns in array)
- #61686 (librustc_errors: Add some more documentation)
- #61698 (typeck: Fix const generic in repeat param ICE.)
- #61707 (Azure: retry failed awscli installs)
- #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone)
- #61724 (core: use memcmp optimization for 128 bit integer slices)
- #61726 (Use `for_each` in `Iterator::partition`)
Failed merges:
r? @ghost
|
|
|
|
|
|
|
|
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
|
|
|
|
This should be used when trying to get at subsets of a larger span,
especially when the larger span is not available in the code attempting
to work with those subsets (especially common in the fmt_macros crate).
This is usually a good replacement for (BytePos, BytePos) and (usize,
usize) tuples.
This commit also removes from_inner_byte_pos, since it took usize
arguments, which is error prone.
|
|
|
|
|
|
|
|
|
|
parser: Remove `Deref` impl from `Parser`
Follow up to https://github.com/rust-lang/rust/pull/61541
You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess.
Not sure.
Probably still better than people using both and being confused about the definition point of `span`.
r? @oli-obk @estebank
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Here follows the main reverts applied in order to make this commit:
Revert "Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj"
This reverts commit 45b09453dbf120cc23d889435aac3ed7d2ec8eb7, reversing
changes made to f6df1f6c30b469cb9e65c5453a0efa03cbb6005e.
Revert "Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakis"
This reverts commit 16939a50ea440e72cb6ecefdaabb988addb1ec0e, reversing
changes made to 12bf98155249783583a91863c5dccf9e346f1226.
Revert "Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj"
This reverts commit 62d1574876f5531bce1b267e62dff520d7adcbbb, reversing
changes made to 4eff8526a789e0dfa8b97f7dec91b7b5c18e8544.
|
|
It reduces two `hygiene_data` accesses to one on some hot paths.
|
|
Because this function is hot.
Also remove the dead `ty_option` function.
|
|
Most involving `Symbol::intern` on string literals.
|