about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/result.rs1
-rw-r--r--src/test/mir-opt/separate_const_switch.identity.ConstProp.diff2
-rw-r--r--src/test/mir-opt/separate_const_switch.identity.PreCodegen.after.mir2
-rw-r--r--src/test/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff2
4 files changed, 4 insertions, 3 deletions
diff --git a/library/core/src/result.rs b/library/core/src/result.rs
index 8ef5ffb962b..3cde63493d3 100644
--- a/library/core/src/result.rs
+++ b/library/core/src/result.rs
@@ -1970,6 +1970,7 @@ impl<T, E, F: ~const From<E>> const ops::FromResidual<Result<convert::Infallible
     for Result<T, F>
 {
     #[inline]
+    #[track_caller]
     fn from_residual(residual: Result<convert::Infallible, E>) -> Self {
         match residual {
             Err(e) => Err(From::from(e)),
diff --git a/src/test/mir-opt/separate_const_switch.identity.ConstProp.diff b/src/test/mir-opt/separate_const_switch.identity.ConstProp.diff
index d5190cdb0c7..0a220e6e72c 100644
--- a/src/test/mir-opt/separate_const_switch.identity.ConstProp.diff
+++ b/src/test/mir-opt/separate_const_switch.identity.ConstProp.diff
@@ -15,7 +15,7 @@
       scope 1 {
           debug residual => _6;            // in scope 1 at $DIR/separate_const_switch.rs:29:9: 29:10
           scope 2 {
-              scope 8 (inlined <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10
+              scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10
                   debug residual => _8;    // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
                   let _16: i32;            // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
                   let mut _17: i32;        // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
diff --git a/src/test/mir-opt/separate_const_switch.identity.PreCodegen.after.mir b/src/test/mir-opt/separate_const_switch.identity.PreCodegen.after.mir
index dee45c58403..b09527e46af 100644
--- a/src/test/mir-opt/separate_const_switch.identity.PreCodegen.after.mir
+++ b/src/test/mir-opt/separate_const_switch.identity.PreCodegen.after.mir
@@ -12,7 +12,7 @@ fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
     scope 1 {
         debug residual => _5;            // in scope 1 at $DIR/separate_const_switch.rs:29:9: 29:10
         scope 2 {
-            scope 8 (inlined <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10
+            scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10
                 debug residual => _6;    // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
                 let _14: i32;            // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
                 let mut _15: i32;        // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
diff --git a/src/test/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff b/src/test/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
index 69f3bec6fea..bfc74aff207 100644
--- a/src/test/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
+++ b/src/test/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
@@ -15,7 +15,7 @@
       scope 1 {
           debug residual => _6;            // in scope 1 at $DIR/separate_const_switch.rs:29:9: 29:10
           scope 2 {
-              scope 8 (inlined <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10
+              scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10
                   debug residual => _8;    // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
                   let _16: i32;            // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10
                   let mut _17: i32;        // in scope 8 at $DIR/separate_const_switch.rs:29:8: 29:10