diff options
| author | Florian Zeitz <florob@babelmonkeys.de> | 2015-02-27 15:36:53 +0100 |
|---|---|---|
| committer | Florian Zeitz <florob@babelmonkeys.de> | 2015-03-02 17:11:51 +0100 |
| commit | f35f973cb700c444d8c029ee13b37dc16d560225 (patch) | |
| tree | 7d87e40045e89a5d75001ef4b241840870b6aed7 /src/librustc_driver | |
| parent | 1cc8b6ec664f30b43f75551e95299d943c8a4e6a (diff) | |
| download | rust-f35f973cb700c444d8c029ee13b37dc16d560225.tar.gz rust-f35f973cb700c444d8c029ee13b37dc16d560225.zip | |
Use `const`s instead of `static`s where appropriate
This changes the type of some public constants/statics in libunicode. Notably some `&'static &'static [(char, char)]` have changed to `&'static [(char, char)]`. The regexp crate seems to be the sole user of these, yet this is technically a [breaking-change]
Diffstat (limited to 'src/librustc_driver')
| -rw-r--r-- | src/librustc_driver/lib.rs | 4 | ||||
| -rw-r--r-- | src/librustc_driver/test.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index d08fb2b313e..15fae351ddb 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -93,7 +93,7 @@ pub mod driver; pub mod pretty; -static BUG_REPORT_URL: &'static str = +const BUG_REPORT_URL: &'static str = "https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports"; @@ -770,7 +770,7 @@ fn parse_crate_attrs(sess: &Session, input: &Input) -> /// The diagnostic emitter yielded to the procedure should be used for reporting /// errors of the compiler. pub fn monitor<F:FnOnce()+Send+'static>(f: F) { - static STACK_SIZE: uint = 8 * 1024 * 1024; // 8MB + const STACK_SIZE: uint = 8 * 1024 * 1024; // 8MB let (tx, rx) = channel(); let w = old_io::ChanWriter::new(tx); diff --git a/src/librustc_driver/test.rs b/src/librustc_driver/test.rs index cdbee9da334..23f07c8e25c 100644 --- a/src/librustc_driver/test.rs +++ b/src/librustc_driver/test.rs @@ -44,7 +44,7 @@ struct RH<'a> { sub: &'a [RH<'a>] } -static EMPTY_SOURCE_STR: &'static str = "#![feature(no_std)] #![no_std]"; +const EMPTY_SOURCE_STR: &'static str = "#![feature(no_std)] #![no_std]"; struct ExpectErrorEmitter { messages: Vec<String> |
