Skip to content

Add c_buffer_length lint helper - #162565

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
JohnTitor:diagnostic-c-buffer-length
Nov 24, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
JohnTitor:diagnostic-c-buffer-length

Conversation

@JohnTitor

@JohnTitor JohnTitor commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

View all comments

An initianl implementation for #148664
Tracking issue: #162563
r? estebank

@rustbot

rustbot commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_attr_ir

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred to diagnostic attributes.

cc @mejrs

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 9, 2026
@mejrs

mejrs commented Sep 10, 2026

Copy link
Copy Markdown
Member

This is quite different from what all other diagnostic attributes do (they customize errors that would get emitted regardless) - this is a lint helper.

I'm not opposed to it, but please get a confirmation from the lang team that they're OK with moving the diagnostic namespace in this direction. See #t-lang > extending the diagnostic namespace for prior discussion.

@JohnTitor

Copy link
Copy Markdown
Member Author

Ah, sorry about that. Opened a topic here: https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/Extend.20the.20diagnostics.20attr.20for.20a.20lint.20helper/with/623001975


This is for a future lint described in [#148664](https://github.com/rust-lang/rust/issues/148664).

<!-- FIXME(JohnTitor): descirbe more once a lint is implemented. -->

@estebank estebank Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@estebank estebank left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks reasonable, r=me after t-lang input.

View changes since this review

@estebank estebank added T-lang Relevant to the language team S-waiting-on-t-lang Status: Awaiting decision from T-lang and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 3, 2026
…tebank

Add a lint helper attribute namespace

(and also port over three rustc lint attributes, as proof of concept)

This PR implements parsing for the `lint` tool namespace (`#[lint::attribute]`) but doesn't add it as a builtin tool, so `#![register_tool(lint)]` is also required to use it. It raises an error on an unknown attribute within that namespace.

The primary motivations for creating this namespace are:
- creating a place for attributes like `trivial_field_reads` (rust-lang#160666) and `c_buffer_length` (rust-lang#162565) to live, as these IMO do not belong in the diagnostic namespace.
- make it easier to unstably land lints and lint helper attributes, as these currently suffer from the "any new built-in attribute is a breaking change" problem.
- implementing (part of) rust-lang#160808

### What is a "lint helper"

Attributes that change how or if a lint is emitted. Think of many of the internal attributes like `#[rustc_as_ptr]` , `#[rustc_pass_by_value]` etc. Other examples are `#[deprecated]` and `#[must_not_suspend]`. Even `clippy` has such a thing: `#[clippy::format_args]`.

### On breaking changes

This doesn't add `lint` as a built-in tool (like `diagnostic`, `rustfmt`, `clippy` etc are) so this pr is not a breaking change. The breaking changes are opt-in by using `#![register_tool(lint)]` in the crate root which is unstable at this time.

The way this PR is implemented means that, even if users could use `#![register_tool(lint)]` stably, they cannot stably use the namespace because an unknown attribute is an error and all valid attributes in it, at this time, are also feature gated. So there is no commitment to stability until we choose to stabilize an attribute in it.

### Going forward

We can require using `#![register_tool(lint)]` indefinitely. It's possible to not require this this by adding `lint` as a builtin tool, but this (assuming rust-lang#162597) breaks
```rust
#[lint::as_ptr]
struct Foo;

mod lint {
    pub use derive as as_ptr;
}
```
However as [nobody on github does this](https://github.com/search?type=code&q=%22%23%5Blint%3A%3A%22+language%3ARust) it's probably only theoretically breaking. It's non-breaking to add it across an edition.

r? @estebank
cc @WaffleLapkin @petrochenkov
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 3, 2026
…tebank

Add a lint helper attribute namespace

(and also port over three rustc lint attributes, as proof of concept)

This PR implements parsing for the `lint` tool namespace (`#[lint::attribute]`) but doesn't add it as a builtin tool, so `#![register_tool(lint)]` is also required to use it. It raises an error on an unknown attribute within that namespace.

The primary motivations for creating this namespace are:
- creating a place for attributes like `trivial_field_reads` (rust-lang#160666) and `c_buffer_length` (rust-lang#162565) to live, as these IMO do not belong in the diagnostic namespace.
- make it easier to unstably land lints and lint helper attributes, as these currently suffer from the "any new built-in attribute is a breaking change" problem.
- implementing (part of) rust-lang#160808

### What is a "lint helper"

Attributes that change how or if a lint is emitted. Think of many of the internal attributes like `#[rustc_as_ptr]` , `#[rustc_pass_by_value]` etc. Other examples are `#[deprecated]` and `#[must_not_suspend]`. Even `clippy` has such a thing: `#[clippy::format_args]`.

### On breaking changes

This doesn't add `lint` as a built-in tool (like `diagnostic`, `rustfmt`, `clippy` etc are) so this pr is not a breaking change. The breaking changes are opt-in by using `#![register_tool(lint)]` in the crate root which is unstable at this time.

The way this PR is implemented means that, even if users could use `#![register_tool(lint)]` stably, they cannot stably use the namespace because an unknown attribute is an error and all valid attributes in it, at this time, are also feature gated. So there is no commitment to stability until we choose to stabilize an attribute in it.

### Going forward

We can require using `#![register_tool(lint)]` indefinitely. It's possible to not require this this by adding `lint` as a builtin tool, but this (assuming rust-lang#162597) breaks
```rust
#[lint::as_ptr]
struct Foo;

mod lint {
    pub use derive as as_ptr;
}
```
However as [nobody on github does this](https://github.com/search?type=code&q=%22%23%5Blint%3A%3A%22+language%3ARust) it's probably only theoretically breaking. It's non-breaking to add it across an edition.

r? @estebank
cc @WaffleLapkin @petrochenkov
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 3, 2026
…tebank

Add a lint helper attribute namespace

(and also port over three rustc lint attributes, as proof of concept)

This PR implements parsing for the `lint` tool namespace (`#[lint::attribute]`) but doesn't add it as a builtin tool, so `#![register_tool(lint)]` is also required to use it. It raises an error on an unknown attribute within that namespace.

The primary motivations for creating this namespace are:
- creating a place for attributes like `trivial_field_reads` (rust-lang#160666) and `c_buffer_length` (rust-lang#162565) to live, as these IMO do not belong in the diagnostic namespace.
- make it easier to unstably land lints and lint helper attributes, as these currently suffer from the "any new built-in attribute is a breaking change" problem.
- implementing (part of) rust-lang#160808

### What is a "lint helper"

Attributes that change how or if a lint is emitted. Think of many of the internal attributes like `#[rustc_as_ptr]` , `#[rustc_pass_by_value]` etc. Other examples are `#[deprecated]` and `#[must_not_suspend]`. Even `clippy` has such a thing: `#[clippy::format_args]`.

### On breaking changes

This doesn't add `lint` as a built-in tool (like `diagnostic`, `rustfmt`, `clippy` etc are) so this pr is not a breaking change. The breaking changes are opt-in by using `#![register_tool(lint)]` in the crate root which is unstable at this time.

The way this PR is implemented means that, even if users could use `#![register_tool(lint)]` stably, they cannot stably use the namespace because an unknown attribute is an error and all valid attributes in it, at this time, are also feature gated. So there is no commitment to stability until we choose to stabilize an attribute in it.

### Going forward

We can require using `#![register_tool(lint)]` indefinitely. It's possible to not require this this by adding `lint` as a builtin tool, but this (assuming rust-lang#162597) breaks
```rust
#[lint::as_ptr]
struct Foo;

mod lint {
    pub use derive as as_ptr;
}
```
However as [nobody on github does this](https://github.com/search?type=code&q=%22%23%5Blint%3A%3A%22+language%3ARust) it's probably only theoretically breaking. It's non-breaking to add it across an edition.

r? @estebank
cc @WaffleLapkin @petrochenkov
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 3, 2026
…tebank

Add a lint helper attribute namespace

(and also port over three rustc lint attributes, as proof of concept)

This PR implements parsing for the `lint` tool namespace (`#[lint::attribute]`) but doesn't add it as a builtin tool, so `#![register_tool(lint)]` is also required to use it. It raises an error on an unknown attribute within that namespace.

The primary motivations for creating this namespace are:
- creating a place for attributes like `trivial_field_reads` (rust-lang#160666) and `c_buffer_length` (rust-lang#162565) to live, as these IMO do not belong in the diagnostic namespace.
- make it easier to unstably land lints and lint helper attributes, as these currently suffer from the "any new built-in attribute is a breaking change" problem.
- implementing (part of) rust-lang#160808

### What is a "lint helper"

Attributes that change how or if a lint is emitted. Think of many of the internal attributes like `#[rustc_as_ptr]` , `#[rustc_pass_by_value]` etc. Other examples are `#[deprecated]` and `#[must_not_suspend]`. Even `clippy` has such a thing: `#[clippy::format_args]`.

### On breaking changes

This doesn't add `lint` as a built-in tool (like `diagnostic`, `rustfmt`, `clippy` etc are) so this pr is not a breaking change. The breaking changes are opt-in by using `#![register_tool(lint)]` in the crate root which is unstable at this time.

The way this PR is implemented means that, even if users could use `#![register_tool(lint)]` stably, they cannot stably use the namespace because an unknown attribute is an error and all valid attributes in it, at this time, are also feature gated. So there is no commitment to stability until we choose to stabilize an attribute in it.

### Going forward

We can require using `#![register_tool(lint)]` indefinitely. It's possible to not require this this by adding `lint` as a builtin tool, but this (assuming rust-lang#162597) breaks
```rust
#[lint::as_ptr]
struct Foo;

mod lint {
    pub use derive as as_ptr;
}
```
However as [nobody on github does this](https://github.com/search?type=code&q=%22%23%5Blint%3A%3A%22+language%3ARust) it's probably only theoretically breaking. It's non-breaking to add it across an edition.

r? @estebank
cc @WaffleLapkin @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Nov 4, 2026
Rollup merge of #163625 - mejrs:lint_helper_namespace-, r=estebank

Add a lint helper attribute namespace

(and also port over three rustc lint attributes, as proof of concept)

This PR implements parsing for the `lint` tool namespace (`#[lint::attribute]`) but doesn't add it as a builtin tool, so `#![register_tool(lint)]` is also required to use it. It raises an error on an unknown attribute within that namespace.

The primary motivations for creating this namespace are:
- creating a place for attributes like `trivial_field_reads` (#160666) and `c_buffer_length` (#162565) to live, as these IMO do not belong in the diagnostic namespace.
- make it easier to unstably land lints and lint helper attributes, as these currently suffer from the "any new built-in attribute is a breaking change" problem.
- implementing (part of) #160808

### What is a "lint helper"

Attributes that change how or if a lint is emitted. Think of many of the internal attributes like `#[rustc_as_ptr]` , `#[rustc_pass_by_value]` etc. Other examples are `#[deprecated]` and `#[must_not_suspend]`. Even `clippy` has such a thing: `#[clippy::format_args]`.

### On breaking changes

This doesn't add `lint` as a built-in tool (like `diagnostic`, `rustfmt`, `clippy` etc are) so this pr is not a breaking change. The breaking changes are opt-in by using `#![register_tool(lint)]` in the crate root which is unstable at this time.

The way this PR is implemented means that, even if users could use `#![register_tool(lint)]` stably, they cannot stably use the namespace because an unknown attribute is an error and all valid attributes in it, at this time, are also feature gated. So there is no commitment to stability until we choose to stabilize an attribute in it.

### Going forward

We can require using `#![register_tool(lint)]` indefinitely. It's possible to not require this this by adding `lint` as a builtin tool, but this (assuming #162597) breaks
```rust
#[lint::as_ptr]
struct Foo;

mod lint {
    pub use derive as as_ptr;
}
```
However as [nobody on github does this](https://github.com/search?type=code&q=%22%23%5Blint%3A%3A%22+language%3ARust) it's probably only theoretically breaking. It's non-breaking to add it across an edition.

r? @estebank
cc @WaffleLapkin @petrochenkov
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Nov 4, 2026
Add a lint helper attribute namespace

(and also port over three rustc lint attributes, as proof of concept)

This PR implements parsing for the `lint` tool namespace (`#[lint::attribute]`) but doesn't add it as a builtin tool, so `#![register_tool(lint)]` is also required to use it. It raises an error on an unknown attribute within that namespace.

The primary motivations for creating this namespace are:
- creating a place for attributes like `trivial_field_reads` (rust-lang/rust#160666) and `c_buffer_length` (rust-lang/rust#162565) to live, as these IMO do not belong in the diagnostic namespace.
- make it easier to unstably land lints and lint helper attributes, as these currently suffer from the "any new built-in attribute is a breaking change" problem.
- implementing (part of) rust-lang/rust#160808

### What is a "lint helper"

Attributes that change how or if a lint is emitted. Think of many of the internal attributes like `#[rustc_as_ptr]` , `#[rustc_pass_by_value]` etc. Other examples are `#[deprecated]` and `#[must_not_suspend]`. Even `clippy` has such a thing: `#[clippy::format_args]`.

### On breaking changes

This doesn't add `lint` as a built-in tool (like `diagnostic`, `rustfmt`, `clippy` etc are) so this pr is not a breaking change. The breaking changes are opt-in by using `#![register_tool(lint)]` in the crate root which is unstable at this time.

The way this PR is implemented means that, even if users could use `#![register_tool(lint)]` stably, they cannot stably use the namespace because an unknown attribute is an error and all valid attributes in it, at this time, are also feature gated. So there is no commitment to stability until we choose to stabilize an attribute in it.

### Going forward

We can require using `#![register_tool(lint)]` indefinitely. It's possible to not require this this by adding `lint` as a builtin tool, but this (assuming rust-lang/rust#162597) breaks
```rust
#[lint::as_ptr]
struct Foo;

mod lint {
    pub use derive as as_ptr;
}
```
However as [nobody on github does this](https://github.com/search?type=code&q=%22%23%5Blint%3A%3A%22+language%3ARust) it's probably only theoretically breaking. It's non-breaking to add it across an edition.

r? @estebank
cc @WaffleLapkin @petrochenkov
@mejrs

mejrs commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

#163625 has merged, so this can be added under lint instead.

@rustbot author

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 11, 2026
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Nov 12, 2026
Add a lint helper attribute namespace

(and also port over three rustc lint attributes, as proof of concept)

This PR implements parsing for the `lint` tool namespace (`#[lint::attribute]`) but doesn't add it as a builtin tool, so `#![register_tool(lint)]` is also required to use it. It raises an error on an unknown attribute within that namespace.

The primary motivations for creating this namespace are:
- creating a place for attributes like `trivial_field_reads` (rust-lang/rust#160666) and `c_buffer_length` (rust-lang/rust#162565) to live, as these IMO do not belong in the diagnostic namespace.
- make it easier to unstably land lints and lint helper attributes, as these currently suffer from the "any new built-in attribute is a breaking change" problem.
- implementing (part of) rust-lang/rust#160808

### What is a "lint helper"

Attributes that change how or if a lint is emitted. Think of many of the internal attributes like `#[rustc_as_ptr]` , `#[rustc_pass_by_value]` etc. Other examples are `#[deprecated]` and `#[must_not_suspend]`. Even `clippy` has such a thing: `#[clippy::format_args]`.

### On breaking changes

This doesn't add `lint` as a built-in tool (like `diagnostic`, `rustfmt`, `clippy` etc are) so this pr is not a breaking change. The breaking changes are opt-in by using `#![register_tool(lint)]` in the crate root which is unstable at this time.

The way this PR is implemented means that, even if users could use `#![register_tool(lint)]` stably, they cannot stably use the namespace because an unknown attribute is an error and all valid attributes in it, at this time, are also feature gated. So there is no commitment to stability until we choose to stabilize an attribute in it.

### Going forward

We can require using `#![register_tool(lint)]` indefinitely. It's possible to not require this this by adding `lint` as a builtin tool, but this (assuming rust-lang/rust#162597) breaks
```rust
#[lint::as_ptr]
struct Foo;

mod lint {
    pub use derive as as_ptr;
}
```
However as [nobody on github does this](https://github.com/search?type=code&q=%22%23%5Blint%3A%3A%22+language%3ARust) it's probably only theoretically breaking. It's non-breaking to add it across an edition.

r? @estebank
cc @WaffleLapkin @petrochenkov
@JohnTitor
JohnTitor force-pushed the diagnostic-c-buffer-length branch from 0e437f5 to 76d939e Compare November 16, 2026 10:15
@rustbot

This comment has been minimized.

@JohnTitor JohnTitor changed the title Add c_buffer_length diagnostic attribute Add c_buffer_length lint helper Nov 16, 2026
@JohnTitor
JohnTitor force-pushed the diagnostic-c-buffer-length branch from 76d939e to d853a9a Compare November 16, 2026 10:19
other: used,
name: Symbol::intern(
&P::PATH.iter().map(|i| i.to_string()).collect::<Vec<_>>().join(".."),
&P::PATH.iter().map(|i| i.to_string()).collect::<Vec<_>>().join("::"),

@JohnTitor JohnTitor Nov 16, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: pre-existing but I guess this is just a typo since implementation (or I just miss another case): #138164

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(#165935 also noticed this)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased.

@JohnTitor
JohnTitor requested a review from estebank November 16, 2026 10:45
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 16, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 16, 2026
@JohnTitor

Copy link
Copy Markdown
Member Author

@estebank Would be great if you could take another look! (@mejrs and big thanks for implementing that!)

Comment on lines +31 to +40
let parsed = (|| {
let list = args.as_list()?;
if list.len() != 2 {
return None;
}
let mut items = list.mixed();
let pointer = items.next()?.meta_item_no_args()?.ident()?;
let length = items.next()?.meta_item_no_args()?.ident()?;
(pointer.name != length.name).then_some((pointer, length))
})();

@mejrs mejrs Nov 18, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use a try block here, try_blocks should be enabled in the crate root already.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good to know! Switched to use it, thanks!

other: used,
name: Symbol::intern(
&P::PATH.iter().map(|i| i.to_string()).collect::<Vec<_>>().join(".."),
&P::PATH.iter().map(|i| i.to_string()).collect::<Vec<_>>().join("::"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(#165935 also noticed this)

let mut items = list.mixed();
let pointer = items.next()?.meta_item_no_args()?.ident()?;
let length = items.next()?.meta_item_no_args()?.ident()?;
(pointer.name != length.name).then_some((pointer, length))

@mejrs mejrs Nov 18, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this (and check_c_buffer_length) does not correctly handle decl macro hygiene, for example with this the following is an error:

#![feature(decl_macro)]

pub macro x($a: ident){
    #[lint::c_buffer_length($a, b)]
    fn abc($a: *mut u8, b: isize){}
}

x!(b);

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(If it makes things easier, you can access the argument names of the function through AstTarget now)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a simple way is to use normalize_to_macro_rules, it seems to work.

@rust-bors

This comment has been minimized.

@JohnTitor
JohnTitor force-pushed the diagnostic-c-buffer-length branch from d853a9a to bcae578 Compare November 23, 2026 04:50
@rustbot

rustbot commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@mejrs mejrs left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

📋 This PR cannot be approved because it currently has the following label: S-waiting-on-t-lang.

Hint: If these labels are no longer accurate, you can remove them with @rustbot label -S-waiting-on-t-lang.

@mejrs mejrs removed the S-waiting-on-t-lang Status: Awaiting decision from T-lang label Nov 23, 2026
@mejrs

mejrs commented Nov 23, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bcae578 has been approved by mejrs

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 23, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
Rollup of 11 pull requests

Successful merges:

 - #165769 (Fix invalid instantiation of fake intrinsic bodies)
 - #166374 (Undo accidental duplication checking for attributes on macro calls)
 - #166386 (Replace manual `AttributeParser` construction by `parse_limited_all`)
 - #162565 (Add `c_buffer_length` lint helper)
 - #166096 (llvm-wrapper: Pass more arguments to PreCodeGenCallback)
 - #166395 (std: fix positioned read/write on VxWorks)
 - #166404 (Change `ChildExt::kill_process_group` to be `&self`)
 - #166405 (Check for errors before encoding metadata)
 - #166412 (std: Fix locking test on GNU/Hurd)
 - #166413 (std: Fix symlink chmod test on GNU/Hurd)
 - #166421 (core: Stabilize `float_bits_const`)
@rust-bors
rust-bors Bot merged commit f6c36f7 into rust-lang:main Nov 24, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 24, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
Rollup merge of #162565 - JohnTitor:diagnostic-c-buffer-length, r=mejrs

Add `c_buffer_length` lint helper

An initianl implementation for #148664
Tracking issue: #162563
r? estebank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants