Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6554086
Add u128 and i128 integer tests
CDirkx Nov 14, 2020
69477f5
Clarify availability of atomic operations
Nov 17, 2020
b491587
Extract write_srclink to its own method
aDotInTheVoid Nov 18, 2020
1094f97
Test drop order for (destructuring) assignments
fanzier Nov 18, 2020
ae644a2
add [src] links to methods on a trait's page
aDotInTheVoid Nov 18, 2020
c711833
Qualify `panic!` as `core::panic!` in non-built-in `core` macros
camelid Oct 25, 2020
50b34c4
Clean up `core` macros documentation
camelid Oct 25, 2020
c48ed78
Add two more test cases
camelid Oct 29, 2020
a050c55
Remove unused `use std::panic;`s
camelid Oct 30, 2020
566e877
Make compiletest testing use the local sysroot
cuviper Nov 18, 2020
8afa22d
Never inline naked functions
tmiasko Nov 19, 2020
8247223
Revert "Always use param_env_reveal_all_normalized in validator"
tmiasko Nov 19, 2020
0ab4458
Revert "Normalize function type during validation"
tmiasko Nov 19, 2020
de08df2
Make as{_mut,}_slice on array::IntoIter public
est31 Nov 19, 2020
0510fd3
Update 32 bit mir-opt test output.
m-ou-se Nov 19, 2020
54588c8
Add jyn514 email alias to mailmap
pickfire Nov 19, 2020
b49fbc9
expand: Tell built-in macros whether we are currently in forced expan…
petrochenkov Nov 14, 2020
e7ee4d6
expand: Move `fully_configure` to `config.rs`
petrochenkov Nov 18, 2020
69894ce
resolve: Introduce a separate `NonMacroAttrKind` for legacy derive he…
petrochenkov Nov 18, 2020
68f94e9
resolve: Centralize some error reporting for unexpected macro resolut…
petrochenkov Nov 18, 2020
dfb690e
resolve/expand: Misc cleanup
petrochenkov Nov 18, 2020
ec54720
expand: Cleanup attribute collection in invocation collector
petrochenkov Nov 18, 2020
cd2177f
expand: Stop derive expansion un unexpected targets early
petrochenkov Nov 18, 2020
d575aa4
expand: Mark some dead code in derive expansion as unreachable
petrochenkov Nov 18, 2020
82f694b
Rollup merge of #78343 - camelid:macros-qualify-panic, r=m-ou-se
Dylan-DPC Nov 19, 2020
ea3f1af
Rollup merge of #79119 - jamesmunns:patch-1, r=Mark-Simulacrum
Dylan-DPC Nov 19, 2020
450f54e
Rollup merge of #79123 - CDirkx:128-bits, r=Mark-Simulacrum
Dylan-DPC Nov 19, 2020
f916a71
Rollup merge of #79177 - fanzier:drop-order-test, r=RalfJung
Dylan-DPC Nov 19, 2020
d34c279
Rollup merge of #79181 - aDotInTheVoid:provided-method-source-link, r…
Dylan-DPC Nov 19, 2020
c520e83
Rollup merge of #79183 - cuviper:compiletest-test-sysroot, r=Mark-Sim…
Dylan-DPC Nov 19, 2020
a234e55
Rollup merge of #79185 - petrochenkov:derattr2, r=Aaron1011
Dylan-DPC Nov 19, 2020
09b3a8b
Rollup merge of #79192 - tmiasko:naked-noinline, r=oli-obk
Dylan-DPC Nov 19, 2020
08184c3
Rollup merge of #79193 - tmiasko:revert-78969-normalize, r=davidtwco
Dylan-DPC Nov 19, 2020
1a2266f
Rollup merge of #79194 - est31:array_into_iter_slice, r=scottmcm
Dylan-DPC Nov 19, 2020
26f0226
Rollup merge of #79204 - pickfire:patch-3, r=jyn514
Dylan-DPC Nov 19, 2020
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
30 changes: 15 additions & 15 deletions library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ macro_rules! assert_eq {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
panic!(r#"assertion failed: `(left == right)`
$crate::panic!(r#"assertion failed: `(left == right)`
left: `{:?}`,
right: `{:?}`"#, &*left_val, &*right_val)
}
Expand All @@ -58,7 +58,7 @@ macro_rules! assert_eq {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
panic!(r#"assertion failed: `(left == right)`
$crate::panic!(r#"assertion failed: `(left == right)`
left: `{:?}`,
right: `{:?}`: {}"#, &*left_val, &*right_val,
$crate::format_args!($($arg)+))
Expand Down Expand Up @@ -95,7 +95,7 @@ macro_rules! assert_ne {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
panic!(r#"assertion failed: `(left != right)`
$crate::panic!(r#"assertion failed: `(left != right)`
left: `{:?}`,
right: `{:?}`"#, &*left_val, &*right_val)
}
Expand All @@ -109,7 +109,7 @@ macro_rules! assert_ne {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
panic!(r#"assertion failed: `(left != right)`
$crate::panic!(r#"assertion failed: `(left != right)`
left: `{:?}`,
right: `{:?}`: {}"#, &*left_val, &*right_val,
$crate::format_args!($($arg)+))
Expand Down Expand Up @@ -466,7 +466,7 @@ macro_rules! writeln {
///
/// # Panics
///
/// This will always [`panic!`]
/// This will always [`panic!`].
///
/// # Examples
///
Expand Down Expand Up @@ -500,13 +500,13 @@ macro_rules! writeln {
#[stable(feature = "rust1", since = "1.0.0")]
macro_rules! unreachable {
() => ({
panic!("internal error: entered unreachable code")
$crate::panic!("internal error: entered unreachable code")
});
($msg:expr $(,)?) => ({
$crate::unreachable!("{}", $msg)
});
($fmt:expr, $($arg:tt)*) => ({
panic!($crate::concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
$crate::panic!($crate::concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
});
}

Expand All @@ -515,15 +515,15 @@ macro_rules! unreachable {
/// This allows your code to type-check, which is useful if you are prototyping or
/// implementing a trait that requires multiple methods which you don't plan of using all of.
///
/// The difference between `unimplemented!` and [`todo!`](macro.todo.html) is that while `todo!`
/// The difference between `unimplemented!` and [`todo!`] is that while `todo!`
/// conveys an intent of implementing the functionality later and the message is "not yet
/// implemented", `unimplemented!` makes no such claims. Its message is "not implemented".
/// Also some IDEs will mark `todo!`s.
///
/// # Panics
///
/// This will always [panic!](macro.panic.html) because `unimplemented!` is just a
/// shorthand for `panic!` with a fixed, specific message.
/// This will always [`panic!`] because `unimplemented!` is just a shorthand for `panic!` with a
/// fixed, specific message.
///
/// Like `panic!`, this macro has a second form for displaying custom values.
///
Expand Down Expand Up @@ -584,8 +584,8 @@ macro_rules! unreachable {
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
macro_rules! unimplemented {
() => (panic!("not implemented"));
($($arg:tt)+) => (panic!("not implemented: {}", $crate::format_args!($($arg)+)));
() => ($crate::panic!("not implemented"));
($($arg:tt)+) => ($crate::panic!("not implemented: {}", $crate::format_args!($($arg)+)));
}

/// Indicates unfinished code.
Expand All @@ -600,7 +600,7 @@ macro_rules! unimplemented {
///
/// # Panics
///
/// This will always [panic!](macro.panic.html)
/// This will always [`panic!`].
///
/// # Examples
///
Expand Down Expand Up @@ -645,8 +645,8 @@ macro_rules! unimplemented {
#[macro_export]
#[stable(feature = "todo_macro", since = "1.40.0")]
macro_rules! todo {
() => (panic!("not yet implemented"));
($($arg:tt)+) => (panic!("not yet implemented: {}", $crate::format_args!($($arg)+)));
() => ($crate::panic!("not yet implemented"));
($($arg:tt)+) => ($crate::panic!("not yet implemented: {}", $crate::format_args!($($arg)+)));
}

/// Definitions of built-in macros.
Expand Down
Loading