Skip to content

Commit 6f8d263

Browse files
committed
tests: replace "lvalue" terminology with "place".
1 parent 46a9bdd commit 6f8d263

9 files changed

+14
-14
lines changed

src/test/compile-fail/regions-adjusted-lvalue-op.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// check that we link regions in mutable lvalue ops correctly - issue #41774
11+
// check that we link regions in mutable place ops correctly - issue #41774
1212

1313
struct Data(i32);
1414

src/test/incremental/hashes/unary_and_binary_exprs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ pub fn value_cast(a: u32) -> i32 {
404404

405405

406406

407-
// Change l-value in assignment ------------------------------------------------
407+
// Change place in assignment --------------------------------------------------
408408
#[cfg(cfail1)]
409-
pub fn lvalue() -> i32 {
409+
pub fn place() -> i32 {
410410
let mut x = 10;
411411
let mut y = 11;
412412
x = 9;
@@ -416,7 +416,7 @@ pub fn lvalue() -> i32 {
416416
#[cfg(not(cfail1))]
417417
#[rustc_clean(except="HirBody,MirOptimized,MirValidated", cfg="cfail2")]
418418
#[rustc_clean(cfg="cfail3")]
419-
pub fn lvalue() -> i32 {
419+
pub fn place() -> i32 {
420420
let mut x = 10;
421421
let mut y = 11;
422422
y = 9;

src/test/run-pass/issue-18514.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Test that we don't ICE when translating a generic impl method from
1212
// an extern crate that contains a match expression on a local
13-
// variable lvalue where one of the match case bodies contains an
13+
// variable place where one of the match case bodies contains an
1414
// expression that autoderefs through an overloaded generic deref
1515
// impl.
1616

src/test/run-pass/issue-18845.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// This used to generate invalid IR in that even if we took the
1212
// `false` branch we'd still try to free the Box from the other
1313
// arm. This was due to treating `*Box::new(9)` as an rvalue datum
14-
// instead of as an lvalue.
14+
// instead of as a place.
1515

1616
fn test(foo: bool) -> u8 {
1717
match foo {

src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Test that an `&mut self` method, when invoked on an lvalue whose
12-
// type is `&mut [u8]`, passes in a pointer to the lvalue and not a
11+
// Test that an `&mut self` method, when invoked on a place whose
12+
// type is `&mut [u8]`, passes in a pointer to the place and not a
1313
// temporary. Issue #19147.
1414

1515
use std::slice;

src/test/run-pass/mir_drop_order.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn main() {
4141
// all borrows are extended - nothing has been dropped yet
4242
assert_eq!(get(), vec![]);
4343
}
44-
// in a let-statement, extended lvalues are dropped
44+
// in a let-statement, extended places are dropped
4545
// *after* the let result (tho they have the same scope
4646
// as far as scope-based borrowck goes).
4747
assert_eq!(get(), vec![0, 2, 3, 1]);

src/test/run-pass/type-ascription.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ fn main() {
4040
assert_eq!(b, 1: u16);
4141

4242
let mut v = Vec::new();
43-
v: Vec<u8> = vec![1, 2, 3]; // Lvalue type ascription
43+
v: Vec<u8> = vec![1, 2, 3]; // Place expression type ascription
4444
assert_eq!(v, [1u8, 2, 3]);
4545
}

src/test/ui/issue-26093.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
macro_rules! not_an_lvalue {
11+
macro_rules! not_a_place {
1212
($thing:expr) => {
1313
$thing = 42;
1414
//~^ ERROR invalid left-hand side expression
1515
}
1616
}
1717

1818
fn main() {
19-
not_an_lvalue!(99);
19+
not_a_place!(99);
2020
}

src/test/ui/issue-26093.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ error[E0070]: invalid left-hand side expression
44
13 | $thing = 42;
55
| ^^^^^^^^^^^ left-hand of expression not valid
66
...
7-
19 | not_an_lvalue!(99);
8-
| ------------------- in this macro invocation
7+
19 | not_a_place!(99);
8+
| ----------------- in this macro invocation
99

1010
error: aborting due to previous error
1111

0 commit comments

Comments
 (0)