Files
rust/tests/ui/asm
León Orell Valerian Liehr 94d780d647 Rollup merge of #131558 - sassman:feat/warnin-for-no-mangle-together-with-export-name, r=Urgau
Lint on combining `#[no_mangle]` and `#[export_name]`

This is my very first contribution to the compiler, even though I read the [chapter about lints](https://rustc-dev-guide.rust-lang.org/diagnostics.html) I'm not very certain that this ~~new lint is done right as a builtin lint~~ PR is right. I appreciate any guidance on how to improve the code.

- Add test for issue #47446
- ~~Implement the new lint `mixed_export_name_and_no_mangle` as a builtin lint (not sure if that is the right way to go)~~ Extend `unused_attributes` lint
- Add suggestion how to fix it

<details>

<summary>Old proposed new lint</summary>

> The `mixed_export_name_and_no_mangle` lint detects usage of both `#[export_name]` and `#[no_mangle]` on the same item which results on `#[no_mangle]` being ignored.
>
> *warn-by-default*
>
> ### Example
>
> ```rust
> #[no_mangle] // ignored
> #[export_name = "foo"] // takes precedences
> pub fn bar() {}
> ```
>
> ### Explanation
>
> The compiler will not respect the `#[no_mangle]` attribute when generating the symbol name for the function, as the `#[export_name]` attribute takes precedence. This can lead to confusion and is unnecessary.

</details>
2024-12-10 08:55:54 +01:00
..
2024-11-10 17:43:46 +09:00
2024-03-03 09:24:38 -05:00
2024-08-13 23:18:31 +02:00
2024-03-03 09:24:38 -05:00
2024-09-29 08:49:37 +02:00
2024-08-13 23:18:31 +02:00
2024-08-13 23:18:31 +02:00
2023-01-11 09:32:08 +00:00
2024-11-15 15:25:19 +01:00
2023-01-11 09:32:08 +00:00
2024-08-13 23:18:31 +02:00
2024-08-13 23:18:31 +02:00
2024-08-13 23:18:31 +02:00
2024-08-13 23:18:31 +02:00