Skip to content

Commit c956c9b

Browse files
committed
---
yaml --- r: 180121 b: refs/heads/auto c: 17e054bbca1e696e564d5e71044b9746288aca92 h: refs/heads/master i: 180119: fd60a1d v: v3
1 parent ff08297 commit c956c9b

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: e5ff1d6fe7b8dd01efadeaddc0f3408e194562ee
13+
refs/heads/auto: 17e054bbca1e696e564d5e71044b9746288aca92
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/test/compile-fail/const-block-non-item-statement.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
static A: usize = { 1us; 2 };
11+
const A: usize = { 1us; 2 };
1212
//~^ ERROR: blocks in constants are limited to items and tail expressions
1313

14-
static B: usize = { { } 2 };
14+
const B: usize = { { } 2 };
1515
//~^ ERROR: blocks in constants are limited to items and tail expressions
1616

1717
macro_rules! foo {
1818
() => (()) //~ ERROR: blocks in constants are limited to items and tail expressions
1919
}
20-
static C: usize = { foo!(); 2 };
20+
const C: usize = { foo!(); 2 };
2121

22-
static D: usize = { let x = 4us; 2 };
22+
const D: usize = { let x = 4us; 2 };
2323
//~^ ERROR: blocks in constants are limited to items and tail expressions
2424

2525
pub fn main() {

branches/auto/src/test/compile-fail/issue-16538.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ mod Y {
2020

2121
static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
2222
//~^ ERROR cannot refer to other statics by value
23-
//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
23+
//~| ERROR the trait `core::marker::Sync` is not implemented for the type
24+
//~| ERROR function calls in statics are limited to struct and enum constructors
2425

2526
fn main() {}

branches/auto/src/test/compile-fail/issue-18118.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
pub fn main() {
12-
static z: &'static isize = {
12+
const z: &'static isize = {
1313
let p = 3;
1414
//~^ ERROR blocks in constants are limited to items and tail expressions
1515
&p

branches/auto/src/test/compile-fail/issue-7364.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use std::cell::RefCell;
1515
// Regression test for issue 7364
1616
static boxed: Box<RefCell<isize>> = box RefCell::new(0);
1717
//~^ ERROR allocations are not allowed in statics
18-
//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
19-
//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
20-
//~^^^^^ ERROR function calls in constants are limited to struct and enum constructors
18+
//~| ERROR the trait `core::marker::Sync` is not implemented for the type
19+
//~| ERROR the trait `core::marker::Sync` is not implemented for the type
20+
//~| ERROR function calls in statics are limited to struct and enum constructors
2121

2222
fn main() { }

branches/auto/src/test/compile-fail/static-vec-repeat-not-constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
fn foo() -> isize { 23 }
1212

1313
static a: [isize; 2] = [foo(); 2];
14-
//~^ ERROR: function calls in constants are limited to struct and enum constructors
14+
//~^ ERROR: function calls in statics are limited to struct and enum constructors
1515

1616
fn main() {}

0 commit comments

Comments
 (0)