Skip to content

Commit 44bec46

Browse files
committed
---
yaml --- r: 180201 b: refs/heads/tmp c: 17e054bbca1e696e564d5e71044b9746288aca92 h: refs/heads/master i: 180199: f2def3f v: v3
1 parent dc30520 commit 44bec46

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
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: e5ff1d6fe7b8dd01efadeaddc0f3408e194562ee
37+
refs/heads/tmp: 17e054bbca1e696e564d5e71044b9746288aca92

branches/tmp/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/tmp/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/tmp/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/tmp/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/tmp/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)