| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Prepare for rework done by the rest of RUST-142440.
Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
|
|
fix: Emit suggestion filename if primary diagnostic span is dummy
While working on using `annotate-snippets` as `rustc`'s emitter, I came across [`tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr`](https://github.com/rust-lang/rust/blob/b03b3a7ec92682be2917540b679478d41c95a30c/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr), which lacked a filename for both the annotation and the suggestion, which seemed like a bug to me. After some investigation, I found that this is happening because the primary span is a dummy, so its filename doesn't get output, and its filename matches the one for the suggestion, so the suggestion's filename doesn't get output. To fix this issue, I made it so that the filename for a suggestion will get output if the primary span is a dummy.
|
|
r=petrochenkov
mbe: Add tests and restructure metavariable expressions
Add tests that show better diagnostics, and factor `concat` handling to a separate function. Each commit message has further details.
This performs the nonfunctional perparation for further changes such as https://github.com/rust-lang/rust/pull/142950 and https://github.com/rust-lang/rust/pull/142975 .
|
|
Replace `ItemCtxt::report_placeholder_type_error` match with a call to `TyCtxt::def_descr`
Fixes rust-lang/rust#143128.
We could likely use `tcx.def_descr` in more places (and therefore remove more `descr` methods). If it's something that we want to do, I can send a follow-up.
r? `@oli-obk`
|
|
r=workingjubilee
inherit `#[align]` from trait method prototypes
````@workingjubilee```` this seems straightforward enough. Now that we're planning to make `-Cmin-function-alignment` a target modifier, I don't think there are any cross-crate complications here?
````@Jules-Bertholet```` is this the behavior you had in mind? In particular the inheritance of the attribute of a default impl is maybe a bit unintuitive at first? (but I think it's ok if that behavior is explicitly documented).
r? ghost
|
|
|
|
Add tests showing the current state to make it more clear when output
gets updated later in refactoring.
|
|
`syntax-errors` currently contains both syntax error tests (which don't
need expansion) and tests for incorrect instantiations of the `count`
metavariable expression (which do need expansion). Split the
expansion-dependent tests to a separate file and remove unneeded
invocations from `syntax-errors`, to ensure we are catching these before
expansion.
|
|
r=petrochenkov
Improve macro stats printing
Fix a small formatting issue that has been annoying me.
r? ``@petrochenkov``
|
|
|
|
`TyCtxt::def_descr`
|
|
Rollup of 14 pull requests
Successful merges:
- rust-lang/rust#142429 (`tests/ui`: A New Order [13/N])
- rust-lang/rust#142514 (Miri: handling of SNaN inputs in `f*::pow` operations)
- rust-lang/rust#143066 (Use let chains in the new solver)
- rust-lang/rust#143090 (Workaround for memory unsafety in third party DLLs)
- rust-lang/rust#143118 (`tests/ui`: A New Order [15/N])
- rust-lang/rust#143159 (Do not freshen `ReError`)
- rust-lang/rust#143168 (`tests/ui`: A New Order [16/N])
- rust-lang/rust#143176 (fix typos and improve clarity in documentation)
- rust-lang/rust#143187 (Add my work email to mailmap)
- rust-lang/rust#143190 (Use the `new` method for `BasicBlockData` and `Statement`)
- rust-lang/rust#143195 (`tests/ui`: A New Order [17/N])
- rust-lang/rust#143196 (Port #[link_section] to the new attribute parsing infrastructure)
- rust-lang/rust#143199 (Re-disable `tests/run-make/short-ice` on Windows MSVC again)
- rust-lang/rust#143219 (Show auto trait and blanket impls for `!`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Re-disable `tests/run-make/short-ice` on Windows MSVC again
We tried to re-enable this for MSVC in https://github.com/rust-lang/rust/pull/142844.
Unfortunately, this test still sometimes fails on Windows MSVC.
Tracked in https://github.com/rust-lang/rust/issues/143198.
FYI ```@dpaoliello``` (I couldn't reproduce this easily locally either)
|
|
Port #[link_section] to the new attribute parsing infrastructure
Ports link_section to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
r? `@oli-obk`
cc `@JonathanBrouwer` `@jdonszelmann`
|
|
`tests/ui`: A New Order [17/N]
> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.
Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
r? `@tgross35`
|
|
`tests/ui`: A New Order [16/N]
> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.
Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
r? `@tgross35`
(just small one to test new method, also I should squash all this commits except move commit, so we after review will end up having like one move commit and one commit with changes, right?)
|
|
Do not freshen `ReError`
Because `ReError` has `ErrorGuaranteed` in it, it affects candidate selection and thus causes incompleteness which leads to weirdness in eval. See the comment in the test.
Also remove an unnecessary `lookup_op_method` since it doesn't effect tests.
Fixes rust-lang/rust#132882.
r? types
|
|
`tests/ui`: A New Order [15/N]
> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.
Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
r? `@jieyouxu`
|
|
`tests/ui`: A New Order [13/N]
Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
r? ```@jieyouxu```
|
|
intrinsics
|
|
|
|
|
|
|
|
|
|
By allowing long names to overlap with the "Uses" field when it has
spare space. This avoids unnecessary line breaks in the output.
|
|
With a long macro name that could fit on one line, but currently isn't
formatted that way, because the name would overlap with the maximum
width of the "Uses" column. (The next commit will fix this.)
|
|
|
|
|
|
|
|
|
|
|
|
Fix suggestion spans inside macros for the `unused_must_use` lint
This PR fixes the suggestion spans inside macros for the `unused_must_use` lint by trying to find the oldest ancestor span.
Fixes https://github.com/rust-lang/rust/issues/143025
|
|
`tests/ui`: A New Order [12/N]
Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
r? `@jieyouxu`
|
|
`tests/ui`: A New Order [9/N]
Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
|
|
Add SIMD funnel shift and round-to-even intrinsics
This PR adds 3 new SIMD intrinsics
- `simd_funnel_shl` - funnel shift left
- `simd_funnel_shr` - funnel shift right
- `simd_round_ties_even` (vector version of `round_ties_even_fN`)
TODO (future PR): implement `simd_fsh{l,r}` in miri, cg_gcc and cg_clif (it is surprisingly hard to implement without branches, the common tricks that rotate uses doesn't work because we have 2 elements now. e.g, the `-n&31` trick used by cg_gcc to implement rotate doesn't work with this because then `fshl(a, b, 0)` will be `a | b`)
[#t-compiler > More SIMD intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/More.20SIMD.20intrinsics/with/522130286)
`@rustbot` label T-compiler T-libs A-intrinsics F-core_intrinsics
r? `@workingjubilee`
|
|
Fix the span of trait bound modifier `[const]`
r? project-const-traits or anyone
|
|
Port `#[link_name]` to the new attribute parsing infrastructure
Ports `link_name` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
r? `@jdonszelmann`
|
|
Generate symbols.o for proc-macros too
To ensure used statics are functioning correctly for proc-macros too.
|
|
r=lolbinarycat
Add regression test for #137857 to ensure that we generate intra doc links for extern crate items.
Fixes https://github.com/rust-lang/rust/issues/137857.
I checked that linking to extern crates was generating valid links (with the `/index.html` part) and since it's already working, just adding a regression test.
r? `@notriddle`
|
|
|
|
Prepare for rework done in the rest of [PR143118].
[PR143118]: https://www.github.com/rust-lang/rust/pull/143118
Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
|
|
|
|
r=GuillaumeGomez
rustdoc: show attributes on enum variants
mostly for #[non_exhaustive]
unsure if there's any attributes we should take care to *not* include, it could use `render_code_attribute` and `is_non_exhaustive` instead, if that is a concern.
fixes rust-lang/rust#142599
|
|
|
|
|
|
Co-authored-by: Anne Stijns <anstijns@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
|
|
Insert checks for enum discriminants when debug assertions are enabled
Similar to the existing null-pointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following:
```rust
let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) };
```
An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++.
This check is similar to Miri's capabilities of checking for valid construction of enum values.
This PR is inspired by saethlin@'s PR
https://github.com/rust-lang/rust/pull/104862. Thank you so much for keeping this code up and the detailed comments!
I also pair-programmed large parts of this together with vabr-g@.
r? `@saethlin`
|
|
for extern crate items.
|