Skip to content

Permit C-style enums in vector repeat length expressions (N.B. values only, not type signatures) - #7827

Closed
jdm wants to merge 1 commit into
rust-lang:masterfrom
jdm:enumlength
Closed

Permit C-style enums in vector repeat length expressions (N.B. values only, not type signatures)#7827
jdm wants to merge 1 commit into
rust-lang:masterfrom
jdm:enumlength

Conversation

@jdm

@jdmjdm commented Jul 16, 2013

Copy link
Copy Markdown
Contributor

Allowing them in type signatures is a significant amount of extra work, unfortunately. This also doesn't apply to static values, which takes a different code path.

bors added a commit that referenced this pull request Jul 16, 2013
Allowing them in type signatures is a significant amount of extra work, unfortunately. This also doesn't apply to static values, which takes a different code path.
@borsbors closed this Jul 17, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 21, 2021
Fixed naive doc formatting for `#[must_use]` lints
The documentation of a few lints around the `#[must_use]` attribute had a few times "[`#[must_use]`]" (without the parentheses, but with the `[]`) and once the "`" was missing.
changelog: Fixed naive doc formatting for `#[must_use]` lints ([`must_use_unit`], [`double_must_use`], [`must_use_candidate`], [`let_underscore_must_use`])
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7827: Fix proc macro TokenStream::from_str token ids r=vlad20012 a=vlad20012
To be honest, I don't know what it changes from a user perspective.
Internally, this fixes spans (token ids) of a `TokenStream` parsed from a string:
```rust
#[proc_macro_derive(FooDerive)]
pub fn foo_derive(item: TokenStream) -> TokenStream {
"fn foo() {}".parse().unwrap()
}
```
Previously, `TokenStream` was constructed from tokens with incremental ids (that conflicted with call-site tokens). Now they are `-1`.
Co-authored-by: vlad20012 <beskvlad@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jdm@graydon@bors