From 6f8d263e876106a3c05a05b93fb78a4de07b37f5 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Mon, 29 Jan 2018 01:59:34 +0200 Subject: [PATCH] tests: replace "lvalue" terminology with "place". --- src/test/compile-fail/regions-adjusted-lvalue-op.rs | 2 +- src/test/incremental/hashes/unary_and_binary_exprs.rs | 6 +++--- src/test/run-pass/issue-18514.rs | 2 +- src/test/run-pass/issue-18845.rs | 2 +- .../run-pass/method-mut-self-modifies-mut-slice-lvalue.rs | 4 ++-- src/test/run-pass/mir_drop_order.rs | 2 +- src/test/run-pass/type-ascription.rs | 2 +- src/test/ui/issue-26093.rs | 4 ++-- src/test/ui/issue-26093.stderr | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/compile-fail/regions-adjusted-lvalue-op.rs b/src/test/compile-fail/regions-adjusted-lvalue-op.rs index 167c863070752..bb02d6d8bba8a 100644 --- a/src/test/compile-fail/regions-adjusted-lvalue-op.rs +++ b/src/test/compile-fail/regions-adjusted-lvalue-op.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// check that we link regions in mutable lvalue ops correctly - issue #41774 +// check that we link regions in mutable place ops correctly - issue #41774 struct Data(i32); diff --git a/src/test/incremental/hashes/unary_and_binary_exprs.rs b/src/test/incremental/hashes/unary_and_binary_exprs.rs index 85f6ef60c5dc0..466690e7ca12b 100644 --- a/src/test/incremental/hashes/unary_and_binary_exprs.rs +++ b/src/test/incremental/hashes/unary_and_binary_exprs.rs @@ -404,9 +404,9 @@ pub fn value_cast(a: u32) -> i32 { -// Change l-value in assignment ------------------------------------------------ +// Change place in assignment -------------------------------------------------- #[cfg(cfail1)] -pub fn lvalue() -> i32 { +pub fn place() -> i32 { let mut x = 10; let mut y = 11; x = 9; @@ -416,7 +416,7 @@ pub fn lvalue() -> i32 { #[cfg(not(cfail1))] #[rustc_clean(except="HirBody,MirOptimized,MirValidated", cfg="cfail2")] #[rustc_clean(cfg="cfail3")] -pub fn lvalue() -> i32 { +pub fn place() -> i32 { let mut x = 10; let mut y = 11; y = 9; diff --git a/src/test/run-pass/issue-18514.rs b/src/test/run-pass/issue-18514.rs index 88bf95f036b86..2a1e55d867f72 100644 --- a/src/test/run-pass/issue-18514.rs +++ b/src/test/run-pass/issue-18514.rs @@ -10,7 +10,7 @@ // Test that we don't ICE when translating a generic impl method from // an extern crate that contains a match expression on a local -// variable lvalue where one of the match case bodies contains an +// variable place where one of the match case bodies contains an // expression that autoderefs through an overloaded generic deref // impl. diff --git a/src/test/run-pass/issue-18845.rs b/src/test/run-pass/issue-18845.rs index 3d8e0556a560e..241408ddef135 100644 --- a/src/test/run-pass/issue-18845.rs +++ b/src/test/run-pass/issue-18845.rs @@ -11,7 +11,7 @@ // This used to generate invalid IR in that even if we took the // `false` branch we'd still try to free the Box from the other // arm. This was due to treating `*Box::new(9)` as an rvalue datum -// instead of as an lvalue. +// instead of as a place. fn test(foo: bool) -> u8 { match foo { diff --git a/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs b/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs index c729f736115a9..4de8f6a719415 100644 --- a/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs +++ b/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Test that an `&mut self` method, when invoked on an lvalue whose -// type is `&mut [u8]`, passes in a pointer to the lvalue and not a +// Test that an `&mut self` method, when invoked on a place whose +// type is `&mut [u8]`, passes in a pointer to the place and not a // temporary. Issue #19147. use std::slice; diff --git a/src/test/run-pass/mir_drop_order.rs b/src/test/run-pass/mir_drop_order.rs index 41cb458c0b8b4..7ab133bbab4e1 100644 --- a/src/test/run-pass/mir_drop_order.rs +++ b/src/test/run-pass/mir_drop_order.rs @@ -41,7 +41,7 @@ fn main() { // all borrows are extended - nothing has been dropped yet assert_eq!(get(), vec![]); } - // in a let-statement, extended lvalues are dropped + // in a let-statement, extended places are dropped // *after* the let result (tho they have the same scope // as far as scope-based borrowck goes). assert_eq!(get(), vec![0, 2, 3, 1]); diff --git a/src/test/run-pass/type-ascription.rs b/src/test/run-pass/type-ascription.rs index bca384c64712f..18fb8e2e408f1 100644 --- a/src/test/run-pass/type-ascription.rs +++ b/src/test/run-pass/type-ascription.rs @@ -40,6 +40,6 @@ fn main() { assert_eq!(b, 1: u16); let mut v = Vec::new(); - v: Vec = vec![1, 2, 3]; // Lvalue type ascription + v: Vec = vec![1, 2, 3]; // Place expression type ascription assert_eq!(v, [1u8, 2, 3]); } diff --git a/src/test/ui/issue-26093.rs b/src/test/ui/issue-26093.rs index 3489a2ca9be15..22751c4a37cdd 100644 --- a/src/test/ui/issue-26093.rs +++ b/src/test/ui/issue-26093.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -macro_rules! not_an_lvalue { +macro_rules! not_a_place { ($thing:expr) => { $thing = 42; //~^ ERROR invalid left-hand side expression @@ -16,5 +16,5 @@ macro_rules! not_an_lvalue { } fn main() { - not_an_lvalue!(99); + not_a_place!(99); } diff --git a/src/test/ui/issue-26093.stderr b/src/test/ui/issue-26093.stderr index c2b81b2ce43fd..b850852623fd8 100644 --- a/src/test/ui/issue-26093.stderr +++ b/src/test/ui/issue-26093.stderr @@ -4,8 +4,8 @@ error[E0070]: invalid left-hand side expression 13 | $thing = 42; | ^^^^^^^^^^^ left-hand of expression not valid ... -19 | not_an_lvalue!(99); - | ------------------- in this macro invocation +19 | not_a_place!(99); + | ----------------- in this macro invocation error: aborting due to previous error