| Age | Commit message (Collapse) | Author | Lines | 
|---|
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | port `#[debugger_visualizer]` to the new attribute system | 
|  | Add an attribute to check the number of lanes in a SIMD vector after monomorphization
Allows std::simd to drop the `LaneCount<N>: SupportedLaneCount` trait and maintain good error messages.
Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs.
r? ``@RalfJung``
cc ``@workingjubilee`` ``@programmerjake`` | 
|  | monomorphization
Unify zero-length and oversized SIMD errors | 
|  |  | 
|  | Co-authored-by: Anne Stijns <anstijns@gmail.com> | 
|  |  | 
|  |  | 
|  | Convert `no_std` and `no_core` to the new attribute infrastructure
r? ```@oli-obk```
Also added a test for these, since we didn't have any and I was kind of surprised new diagnostics didn't break anything hehe | 
|  | r=jdonszelmann,ralfjung,traviscross
Implement `#[rustc_align_static(N)]` on `static`s
Tracking issue: https://github.com/rust-lang/rust/issues/146177
```rust
#![feature(static_align)]
#[rustc_align_static(64)]
static SO_ALIGNED: u64 = 0;
```
We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`.
r? `@traviscross` | 
|  |  | 
|  |  | 
|  | We need a different attribute than `rustc_align` because unstable attributes are
tied to their feature (we can't have two unstable features use the same
unstable attribute). Otherwise this uses all of the same infrastructure
as `#[rustc_align]`. | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | Add new `doc(attribute = "...")` attribute
Fixes rust-lang/rust#141123.
The implementation and purpose of this new `#[doc(attribute = "...")]` attribute is very close to `#[doc(keyword = "...")]`. Which means that luckily for us, most of the code needed was already in place and `@Noratrieb` nicely wrote a first draft that helped me implement this new attribute very fast.
Now with all this said, there is one thing I didn't do yet: adding a `rustdoc-js-std` test. I added GUI tests with search results for attributes so should be fine but I still plan on adding one for it once documentation for builtin attributes will be written into the core/std libs.
You can test it [here](https://rustdoc.crud.net/imperio/doc-attribute-attribute/foo/index.html).
cc `@Noratrieb` `@Veykril` | 
|  | with namespace | 
|  | `is_primitive`, `is_keyword` and `is_attribute` methods | 
|  |  | 
|  |  | 
|  | add a flag to codegen fn attrs for foreign items
r? `@ghost`
refiled to rerun CI | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | This uses the feature gate for
https://github.com/rust-lang/rust/issues/143352, but is described in
https://github.com/rust-lang/rfcs/pull/3820 which is strongly tied to
the experiment. | 
|  | Port must_use to the new target checking
This PR ports `must_use` to the new target checking logic
This also adds a tool-only suggestion to remove attributes on invalid targets, as to not immediately undo the work of https://github.com/rust-lang/rust/pull/145274
r? `@jdonszelmann` | 
|  |  | 
|  | Remove the `#[no_sanitize]` attribute in favor of `#[sanitize(xyz = "on|off")]`
This came up during the sanitizer stabilization (rust-lang/rust#123617). Instead of a `#[no_sanitize(xyz)]` attribute, we would like to have a `#[sanitize(xyz = "on|off")]` attribute, which is more powerful and allows to be extended in the future (instead
of just focusing on turning sanitizers off). The implementation is done according to what was [discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/343119-project-exploit-mitigations/topic/Stabilize.20the.20.60no_sanitize.60.20attribute/with/495377292)).
The new attribute also works on modules, traits and impl items and thus enables usage as the following:
```rust
#[sanitize(address = "off")]
mod foo {
    fn unsanitized(..) {}
    #[sanitize(address = "on")]
    fn sanitized(..) {}
}
trait MyTrait {
  #[sanitize(address = "off")]
  fn unsanitized_default(..) {}
}
#[sanitize(thread = "off")]
impl MyTrait for () {
    ...
}
```
r? ```@rcvalle``` | 
|  | This removes the #[no_sanitize] attribute, which was behind an unstable
feature named no_sanitize. Instead, we introduce the sanitize attribute
which is more powerful and allows to be extended in the future (instead
of just focusing on turning sanitizers off).
This also makes sanitize(kernel_address = ..) attribute work with
-Zsanitize=address
To do it the same as how clang disables address sanitizer, we now
disable ASAN on sanitize(kernel_address = "off") and KASAN on
sanitize(address = "off").
The same was added to clang in https://reviews.llvm.org/D44981. | 
|  | This change implements the #[sanitize(..)] attribute, which opts to
replace the currently unstable #[no_sanitize]. Essentially the new
attribute works similar as #[no_sanitize], just with more flexible
options regarding where it is applied. E.g. it is possible to turn
a certain sanitizer either on or off:
`#[sanitize(address = "on|off")]`
This attribute now also applies to more places, e.g. it is possible
to turn off a sanitizer for an entire module or impl block:
```rust
\#[sanitize(address = "off")]
mod foo {
    fn unsanitized(..) {}
    #[sanitize(address = "on")]
    fn sanitized(..) {}
}
\#[sanitize(thread = "off")]
impl MyTrait for () {
    ...
}
```
This attribute is enabled behind the unstable `sanitize` feature. | 
|  |  | 
|  |  | 
|  |  | 
|  | Remove unused `#[must_use]`
Self-explanatory
Fixes https://github.com/rust-lang/rust/issues/145257 | 
|  |  | 
|  | Make no_mangle on foreign items explicit instead of implicit
for a followup PR I'm working on I need some foreign items to mangle. I could add a new attribute: `no_no_mangle` or something silly like that but by explicitly putting `no_mangle` in the codegen fn attrs of foreign items we can default it to `no_mangle` and then easily remove it when we don't want it.
I guess you'd know about this r? `@bjorn3.` Shouldn't be too hard to review :)
Builds on rust-lang/rust#144655 which should merge first. | 
|  | Support using #[unstable_feature_bound] on trait
This is needed to unblock https://github.com/rust-lang/rust/pull/145095
r? ```````@BoxyUwU``````` | 
|  | Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)
This is a slightly modified version of ae1487aa9922de7642c448cc0908584026699e1c, which caused a performance regression (reverted in https://github.com/rust-lang/rust/pull/145086#issue-3303428759). The diff between this PR and the previous one can be seen in 027a1def.
r? ```````@jdonszelmann``````` :sparkling_heart: | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | This reverts commit 4f7a6ace9e2f2192af7b5d32f4b1664189e0e143. |