Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions compiler/rustc_lint/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,7 @@ pub(crate) enum RedefiningRuntimeSymbolsDiag<'tcx> {
"invalid definition of the runtime `{$symbol_name}` symbol used by the standard library"
)]
#[note(
"expected `{$expected_fn_sig}` (for the current target)
found `{$found_fn_sig}`"
"expected `{$expected_fn_sig}` (for the current target)\n{\" \"}found `{$found_fn_sig}`"
)]
#[help(
"either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = \"{$symbol_name}\")]`, or `#[link_name = \"{$symbol_name}\"]`"
Expand All @@ -955,8 +954,7 @@ pub(crate) enum RedefiningRuntimeSymbolsDiag<'tcx> {
"suspicious definition of the runtime `{$symbol_name}` symbol used by the standard library"
)]
#[note(
"expected `{$expected_fn_sig}` (for the current target)
found `{$found_fn_sig}`"
"expected `{$expected_fn_sig}` (for the current target)\n{\" \"}found `{$found_fn_sig}`"
)]
#[help(
"either fix the signature or remove any attributes like `#[unsafe(no_mangle)]`, `#[unsafe(export_name = \"{$symbol_name}\")]`, or `#[link_name = \"{$symbol_name}\"]`"
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_macros/src/diagnostics/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ fn verify_message_formatting(attr_span: Span, msg_span: Span, message: &str) {
if line.is_empty() {
continue;
}
if line.trim().starts_with("{") && line.contains(&"found ") {
continue;
}
let indent = line.chars().take_while(|c| *c == ' ').count();
if indent < start {
span_err(
Expand Down
15 changes: 13 additions & 2 deletions library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,25 @@
// from other crates, but since this can only appear for lang items, it doesn't seem worth fixing.
#![feature(intra_doc_pointers)]

#[cfg(not(no_rc))]
#[stable(feature = "rust1", since = "1.0.0")]
pub use rcs::rc;

// Module with internal macros used by other modules (needs to be included before other modules).
#[macro_use]
mod macros;

mod raw_vec;

/// Implementations of reference-counted pointers.
#[cfg(not(no_rc))]
mod rcs {
pub mod rc;

#[cfg(all(not(no_sync), target_has_atomic = "ptr"))]
pub(crate) mod arc;
}

// Heaps provided for low-level allocation strategies
pub mod alloc;

Expand All @@ -256,8 +269,6 @@ pub mod intrinsics;
#[unstable(feature = "alloc_io", issue = "154046")]
pub mod io;
pub mod panicking;
#[cfg(not(no_rc))]
pub mod rc;
pub mod slice;
pub mod str;
pub mod string;
Expand Down
Loading
Loading