Skip to content

Commit

Permalink
Rollup merge of rust-lang#39556 - zackmdavis:issue_kebab_2_electric_b…
Browse files Browse the repository at this point in the history
…oogaloo, r=petrochenkov

continue to prefer hyphens in test files named after issue numbers

a [followup](rust-lang#38473 (comment)) to rust-lang#38473

(The files in `auxillary/` directories have an excuse, as they get used as crates/modules, for which snake_case names make more sense.)
  • Loading branch information
frewsxcv authored Feb 5, 2017
2 parents 78bf59b + 1c26f8c commit be95d13
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 90 deletions.
80 changes: 78 additions & 2 deletions src/test/compile-fail/issue-32829.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,85 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: calls in statics are limited
#![feature(const_fn)]

static S : u64 = { { panic!("foo"); 0 } };
const bad: u32 = {
{
5; //~ ERROR: blocks in constants are limited to items and tail expressions
0
}
};

const bad_two: u32 = {
{
invalid();
//~^ ERROR: blocks in constants are limited to items and tail expressions
//~^^ ERROR: calls in constants are limited to constant functions, struct and enum
0
}
};

const bad_three: u32 = {
{
valid();
//~^ ERROR: blocks in constants are limited to items and tail expressions
0
}
};

static bad_four: u32 = {
{
5; //~ ERROR: blocks in statics are limited to items and tail expressions
0
}
};

static bad_five: u32 = {
{
invalid();
//~^ ERROR: blocks in statics are limited to items and tail expressions
//~^^ ERROR: calls in statics are limited to constant functions, struct and enum
0
}
};

static bad_six: u32 = {
{
valid();
//~^ ERROR: blocks in statics are limited to items and tail expressions
0
}
};

static mut bad_seven: u32 = {
{
5; //~ ERROR: blocks in statics are limited to items and tail expressions
0
}
};

static mut bad_eight: u32 = {
{
invalid();
//~^ ERROR: blocks in statics are limited to items and tail expressions
//~^^ ERROR: calls in statics are limited to constant functions, struct and enum
0
}
};

static mut bad_nine: u32 = {
{
valid();
//~^ ERROR: blocks in statics are limited to items and tail expressions
0
}
};

fn invalid() {}
const fn valid() {}

static S: u64 = { { panic!("foo"); 0 } };
//~^ ERROR: calls in statics are limited

fn main() {
println!("{:?}", S);
Expand Down
88 changes: 0 additions & 88 deletions src/test/compile-fail/issue32829.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit be95d13

Please sign in to comment.