| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Fix {:#?} representation of proc_macro::Literal
Before:
```rust
TokenStream [
Ident {
ident: "name",
span: #0 bytes(37..41),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(42..43),
},
Literal { lit: Lit { kind: Str, symbol: "SNPP", suffix: None }, span: Span { lo: BytePos(44), hi: BytePos(50), ctxt: #0 } },
Punct {
ch: ',',
spacing: Alone,
span: #0 bytes(50..51),
},
Ident {
ident: "owner",
span: #0 bytes(56..61),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(62..63),
},
Literal { lit: Lit { kind: Str, symbol: "Canary M Burns", suffix: None }, span: Span { lo: BytePos(64), hi: BytePos(80), ctxt: #0 } },
]
```
After:
```rust
TokenStream [
Ident {
ident: "name",
span: #0 bytes(37..41),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(42..43),
},
Literal {
kind: Str,
symbol: "SNPP",
suffix: None,
span: #0 bytes(44..50),
},
Punct {
ch: ',',
spacing: Alone,
span: #0 bytes(50..51),
},
Ident {
ident: "owner",
span: #0 bytes(56..61),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(62..63),
},
Literal {
kind: Str,
symbol: "Canary M Burns",
suffix: None,
span: #0 bytes(64..80),
},
]
```
|
|
|
|
Before:
TokenStream [
Ident {
ident: "name",
span: #0 bytes(37..41),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(42..43),
},
Literal { lit: Lit { kind: Str, symbol: "SNPP", suffix: None }, span: Span { lo: BytePos(44), hi: BytePos(50), ctxt: #0 } },
Punct {
ch: ',',
spacing: Alone,
span: #0 bytes(50..51),
},
Ident {
ident: "owner",
span: #0 bytes(56..61),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(62..63),
},
Literal { lit: Lit { kind: Str, symbol: "Canary M Burns", suffix: None }, span: Span { lo: BytePos(64), hi: BytePos(80), ctxt: #0 } },
]
After:
TokenStream [
Ident {
ident: "name",
span: #0 bytes(37..41),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(42..43),
},
Literal {
kind: Str,
symbol: "SNPP",
suffix: None,
span: #0 bytes(44..50),
},
Punct {
ch: ',',
spacing: Alone,
span: #0 bytes(50..51),
},
Ident {
ident: "owner",
span: #0 bytes(56..61),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(62..63),
},
Literal {
kind: Str,
symbol: "Canary M Burns",
suffix: None,
span: #0 bytes(64..80),
},
]
|
|
Stabilize `Span::mixed_site`
Closes https://github.com/rust-lang/rust/issues/65049.
cc https://github.com/rust-lang/rust/issues/54727#issuecomment-580647446
Pre-requisite for https://github.com/rust-lang/rust/pull/68717 ("Stabilize fn-like proc macros in expression, pattern and statement positions").
Stabilization report: https://github.com/rust-lang/rust/pull/68716#issuecomment-581076337.
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #69041 (proc_macro: Stabilize `Span::resolved_at` and `Span::located_at`)
- #69813 (Implement BitOr and BitOrAssign for the NonZero integer types)
- #70712 (stabilize BTreeMap::remove_entry)
- #71168 (Deprecate `{Box,Rc,Arc}::into_raw_non_null`)
- #71544 (Replace filter_map().next() calls with find_map())
- #71545 (Fix comment in docstring example for Error::kind)
- #71548 (Add missing Send and Sync impls for linked list Cursor and CursorMut.)
Failed merges:
r? @ghost
|
|
|
|
|
|
|
|
|
|
|
|
They used to be covered by `optin_builtin_traits` but negative impls
are now applicable to all traits, not just auto traits.
This also adds docs in the unstable book for the current state of auto traits.
|
|
|
|
|
|
|
|
This should allow LexError to play much nicer with the `?` operator.
|
|
This flag opts out of the min-const-fn checks entirely, which is usually
not what we want. The few cases where the flag is still necessary have
been annotated.
|
|
|
|
|
|
This commit stabilizes RFC 2008 (#44109) by removing the feature gate.
Signed-off-by: David Wood <david@davidtw.co>
|
|
Tracking issue: https://github.com/rust-lang/rust/issues/61129
|
|
|
|
|
|
Previously in was implemented using a special hack in the metadata loader
|
|
rustbuild
Remove some random unnecessary lint `allow`s
|
|
|
|
This updates the `Extend` implementations to use `for_each` for many
collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`,
`TokenStream`, `VecDeque`, and `Wtf8Buf`.
Folding with `for_each` enables better performance than a `for`-loop for
some iterators, especially if they can just forward to internal
iterators, like `Chain` and `FlatMap` do.
|
|
Introduce proc_macro::Span::source_text
A function to extract the actual source behind a Span.
Background: I would like to use `syn` in a `build.rs` script to parse the rust code, and extract part of the source code. However, `syn` only gives access to proc_macro2::Span, and i would like to get the source code behind that.
I opened an issue on proc_macro2 bug tracker for this feature https://github.com/alexcrichton/proc-macro2/issues/110 and @alexcrichton said the feature should first go upstream in proc_macro. So there it is!
Since most of the Span API is unstable anyway, this is guarded by the same `proc_macro_span` feature as everything else.
|
|
Convert old first edition links to current edition one
r? @steveklabnik
|
|
Use footnote style to bypass the tidy check
|
|
Cosmetic improvements to doc comments
This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).
r? @steveklabnik
Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(compiler front-ends).
|
|
|
|
|
|
|