| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Improve hover module path rendering
|
|
|
|
|
|
fix: Do not compute `prettify_macro_expansion()` unless the "Inline macro" assist has actually been invoked
|
|
internal: Add Definition::Crate
|
|
This is its own thing so it should be handled specifically where possible
|
|
Only treat plain literal patterns as short
See https://github.com/rust-lang/rust/pull/134228#discussion_r1905848384 and https://github.com/rust-lang/rust/pull/134228#discussion_r1905916702 for context. We never wanted to treat const blocks and paths as short, only plain literals.
I don't know how to write a test for this, it.s not clear to me how the short pattern check actually affects the formatting
|
|
minor: Remove two hir reexports
|
|
feat: Add a new and improved syntax tree view
|
|
Rollup of 8 pull requests
Successful merges:
- #133088 (`-Zrandomize-layout` harder. `Foo<T> != Foo<U>`)
- #134619 (Improve prose around `as_slice` example of IterMut)
- #134855 (Add `default_field_values` entry to unstable book)
- #134908 (Fix `ptr::from_ref` documentation example comment)
- #135275 (Add Pin::as_deref_mut to 1.84 relnotes)
- #135294 (Make `bare-fn-no-impl-fn-ptr-99875` test less dependent on path width)
- #135304 (Add tests cases from review of #132289)
- #135308 (Make sure to walk into nested const blocks in `RegionResolutionVisitor`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
`-Zrandomize-layout` harder. `Foo<T> != Foo<U>`
Tracking issue: #106764
Previously randomize-layout only used a deterministic shuffle based on the seed stored in an Adt's ReprOptions, meaning that `Foo<T>` and `Foo<U>` were shuffled by the same seed. This change adds a similar seed to each calculated LayoutData so that a struct can be randomized both based on the layout of its fields and its per-type seed.
Primitives start with simple seed derived from some of their properties. Though some types can no longer be distinguished at that point, e.g. usize and u64 will still be treated the same.
|
|
|
|
|
|
has actually been invoked
And not just called to be listed.
This was a major performance hang when repeatedly switching back-and-forth between a large `include!`d file (but there are others)..
|
|
|
|
We need to *remove* the whole subtree, but we don't advance `i` by this, because it hasn't gotten there yet (and never will).
|
|
|
|
|
|
clippy-subtree-update
|
|
in particular to get the new benchmark error handling
|
|
|
|
fix: Fix actual token lookup in completion's `expand()`
|
|
Add config setting which allows adding additional include paths to the VFS.
|
|
fix: Make edition per-token, not per-file
|
|
refactor: struct holding cargo cfgs settings
|
|
|
|
minor: Fixup macro error kinds
|
|
|
|
refactor test helpers within ide-completions
|
|
Include rustc and rustdoc book in replace-version-placeholder
This PR includes the *(stable)* rustc and rustdoc books which might contain `CURRENT_RUSTC_VERSION` that should be replaced when branching beta. Include them so they are not forgotten.
I didn't include any other folder or books as they don't strike me as relevant for it and might be problematic in the future if some of the submodules are turned into subtree, because we have places where we wouldn't want to replace them.
cf. https://github.com/rust-lang/rust/pull/135163#issuecomment-2574694931
cc `@pietroalbini`
|
|
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
|
|
It should be left biased, not right biased, because when e.g. the use has typed `h` then requested completion, the `h` is what we want to find, not the next token (which might indeed be inside a macro call).
I'm not sure why I wrote `right_biased()` to begin with (I remember I had a reason and not just "both should work"), I might've copied the code in `expand_and_analyze()` (which is wrong, because there it lookups on the speculative file, where right biased will always find the correct token and left biased not).
This is still not perfect, because there might not be an identifier already typed then we might still end up in a macro call, but this is the best we can do.
|
|
|
|
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fix: Fix `env`/`option_env` macro check disregarding macro_rules definitions
|
|
|
|
internal: Migrate `if let` replacement assists to `SyntaxEditor`
|
|
|
|
|
|
|
|
|
|
|