Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #130674

Merged
merged 29 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b94c5a1
Avoid re-validating UTF-8 in `FromUtf8Error::into_utf8_lossy`
okaneco Aug 25, 2024
6d788a1
Resolve RTN for TyKind::Path ending in (..)
compiler-errors Aug 23, 2024
19881b5
Conditionally allow lowering RTN (..) in paths
compiler-errors Aug 26, 2024
51b51bb
Implement RTN in resolve_bound_vars and HIR ty lowering
compiler-errors Aug 26, 2024
7c8e281
Flesh out some TODOs
compiler-errors Aug 26, 2024
174c3f9
Add missing diagnostics and flesh out tests
compiler-errors Aug 26, 2024
af24d0b
Resolve self type alias in impl for RTN
compiler-errors Aug 26, 2024
50b8915
Add --enable-profiler to armhf dist
qwertynerd97 Sep 21, 2024
b94f293
ABI compatibility: mention Result guarantee
RalfJung Sep 21, 2024
1ddd67a
add `C-cmse-nonsecure-entry` ABI
folkertdev Aug 15, 2024
5722a80
remove `#[cmse_nonsecure_entry]`
folkertdev Jul 31, 2024
a33dcb3
add test that accepts a `C-cmse-nonsecure-call` function pointer
folkertdev Jul 16, 2024
a41c209
Add assembly test for the cmse unstable features
folkertdev Jul 18, 2024
4d75a4f
disallow cmse ABIs on unsupported platforms
folkertdev Aug 1, 2024
ac9a49f
mark `E0775` as no longer emitte by the compiler
folkertdev Sep 21, 2024
1de894f
More tests and tweak comments
compiler-errors Sep 21, 2024
93993c7
compiler: Accept "improper" ctypes in extern "rust-cold" fn
workingjubilee Sep 21, 2024
a846d55
Assert that explicit_super_predicates_of and explicit_item_bounds tru…
compiler-errors Sep 21, 2024
4f3d06f
Don't elaborate effects predicates into bounds list unless we're actu…
compiler-errors Sep 21, 2024
e90e259
Parser: recover from `:::` to `::`
GrigorenkoPV Sep 21, 2024
82482dc
Parser: recover from `:::` to `::` in delegations
GrigorenkoPV Sep 21, 2024
2a9525b
Rollup merge of #127766 - folkertdev:c-cmse-nonsecure-entry, r=jackh726
compiler-errors Sep 21, 2024
d72d44d
Rollup merge of #129629 - compiler-errors:rtn-in-path, r=jackh726
compiler-errors Sep 21, 2024
493852c
Rollup merge of #130408 - okaneco:into_lossy_refactor, r=Noratrieb
compiler-errors Sep 21, 2024
3640d11
Rollup merge of #130651 - qwertynerd97:patch-1, r=Kobzol
compiler-errors Sep 21, 2024
2e43793
Rollup merge of #130653 - RalfJung:result-abi-compat, r=traviscross
compiler-errors Sep 21, 2024
d1b43d0
Rollup merge of #130666 - compiler-errors:super-bounds, r=fee1-dead,f…
compiler-errors Sep 21, 2024
a66563f
Rollup merge of #130667 - workingjubilee:she-is-c-c-c-cold, r=compile…
compiler-errors Sep 21, 2024
52f146d
Rollup merge of #130673 - GrigorenkoPV:path-triple-colon, r=compiler-…
compiler-errors Sep 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion compiler/rustc_lint/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,10 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
}

fn is_internal_abi(&self, abi: SpecAbi) -> bool {
matches!(abi, SpecAbi::Rust | SpecAbi::RustCall | SpecAbi::RustIntrinsic)
matches!(
abi,
SpecAbi::Rust | SpecAbi::RustCall | SpecAbi::RustCold | SpecAbi::RustIntrinsic
)
}

/// Find any fn-ptr types with external ABIs in `ty`.
Expand Down
14 changes: 14 additions & 0 deletions tests/ui/lint/rust-cold-fn-accept-improper-ctypes.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//@ check-pass
#![feature(rust_cold_cc)]

// extern "rust-cold" is a "Rust" ABI so we accept `repr(Rust)` types as arg/ret without warnings.

pub extern "rust-cold" fn f(_: ()) -> Result<(), ()> {
Ok(())
}

extern "rust-cold" {
pub fn g(_: ()) -> Result<(), ()>;
}

fn main() {}