about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-1/+1
2015-02-17std: Rename io/path features with old_ prefixAlex Crichton-2/+2
This commit renames the features for the `std::old_io` and `std::old_path` modules to `old_io` and `old_path` to help facilitate migration to the new APIs. This is a breaking change as crates which mention the old feature names now need to be renamed to use the new feature names. [breaking-change]
2015-02-17Fix removal of complement-bugreport.mdManish Goregaokar-1/+1
2015-02-17Rollup merge of #22383 - pnkfelix:pass-features-along-during-expansion, r=huonwManish Goregaokar-1/+2
Pass features along during expansion Use the set of passed features to detect uses of feature-gated macros without the corresponding feature enabled. Fix #22234. ---- Also, the framework this add (passing along a reference to the features in the expansion context) is a necessary precursor for landing a properly feature-gated desugaring-based overloaded-`box` and placement-`in` (#22181). ---- This is fixing a bug, but since there might be code out there that is unknowingly taking advantage of that bug, I feel obligated to mark this as a: [breaking-change]
2015-02-17Rollup merge of #22241 - kmcallister:macro-plugin-cleanup, r=sfacklerManish Goregaokar-4/+6
2015-02-16rustc: merge check_static into check_const.Eduard Burtescu-3/+0
2015-02-16rustc: remove the vestigial "const marking" pass.Eduard Burtescu-4/+0
2015-02-15libsyntax: Pass feature set in ExpansionConfig, not just enable_quotes.Felix S. Klock II-1/+2
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+1
2015-02-15Rollup merge of #22201 - brson:version, r=nick29581Manish Goregaokar-0/+5
rustc --version says ``` rustc 1.0.0-dev (d0e82a68a 2015-02-05 14:38:56 -0800) (built 2015-02-11) ```
2015-02-13Add the build date to the reported version. #21957Brian Anderson-0/+5
rustc --version says ``` rustc 1.0.0-dev (d0e82a68a 2015-02-05) (built 2015-02-11) ```
2015-02-12Separate macro and plugin loadingKeegan McAllister-4/+6
Now they just share a bit of code internal to creader. Resolves #22198 to my satisfaction.
2015-02-11rollup merge of #22188: alexcrichton/envv2Alex Crichton-5/+4
This commit tweaks the interface of the `std::env` module to make it more ergonomic for common usage: * `env::var` was renamed to `env::var_os` * `env::var_string` was renamed to `env::var` * `env::args` was renamed to `env::args_os` * `env::args` was re-added as a panicking iterator over string values * `env::vars` was renamed to `env::vars_os` * `env::vars` was re-added as a panicking iterator over string values. This should make common usage (e.g. unicode values everywhere) more ergonomic as well as "the default". This is also a breaking change due to the differences of what's yielded from each of these functions, but migration should be fairly easy as the defaults operate over `String` which is a common type to use. [breaking-change]
2015-02-11std: Tweak the std::env OsString/String interfaceAlex Crichton-5/+4
This commit tweaks the interface of the `std::env` module to make it more ergonomic for common usage: * `env::var` was renamed to `env::var_os` * `env::var_string` was renamed to `env::var` * `env::args` was renamed to `env::args_os` * `env::args` was re-added as a panicking iterator over string values * `env::vars` was renamed to `env::vars_os` * `env::vars` was re-added as a panicking iterator over string values. This should make common usage (e.g. unicode values everywhere) more ergonomic as well as "the default". This is also a breaking change due to the differences of what's yielded from each of these functions, but migration should be fairly easy as the defaults operate over `String` which is a common type to use. [breaking-change]
2015-02-11Added DestructionScope variant to CodeExtent, representing the areaFelix S. Klock II-2/+2
immediately surrounding a node that is a terminating_scope (e.g. statements, looping forms) during which the destructors run (the destructors for temporaries from the execution of that node, that is). Introduced DestructionScopeData newtype wrapper around ast::NodeId, to preserve invariant that FreeRegion and ScopeChain::BlockScope carry destruction scopes (rather than arbitrary CodeExtents). Insert DestructionScope and block Remainder into enclosing CodeExtents hierarchy. Add more doc for DestructionScope, complete with ASCII art. Switch to constructing DestructionScope rather than Misc in a number of places, mostly related to `ty::ReFree` creation, and use destruction-scopes of node-ids at various calls to liberate_late_bound_regions. middle::resolve_lifetime: Map BlockScope to DestructionScope in `fn resolve_free_lifetime`. Add the InnermostDeclaringBlock and InnermostEnclosingExpr enums that are my attempt to clarify the region::Context structure, and that later commmts build upon. Improve the debug output for `CodeExtent` attached to `ty::Region::ReScope`. Loosened an assertion in `rustc_trans::trans::cleanup` to account for `DestructionScope`. (Perhaps this should just be switched entirely over to `DestructionScope`, rather than allowing for either `Misc` or `DestructionScope`.) ---- Even though the DestructionScope is new, this particular commit should not actually change the semantics of any current code.
2015-02-10Auto merge of #22026 - kmcallister:plugin, r=sfacklerbors-1/+0
```rust #[plugin] #[no_link] extern crate bleh; ``` becomes a crate attribute ```rust #![plugin(bleh)] ``` The feature gate is still required. It's almost never correct to link a plugin into the resulting library / executable, because it will bring all of libsyntax and librustc with it. However if you really want this behavior, you can get it with a separate `extern crate` item in addition to the `plugin` attribute. Fixes #21043. Fixes #20769. [breaking-change]
2015-02-09Use a crate attribute to load pluginsKeegan McAllister-1/+0
#[plugin] #[no_link] extern crate bleh; becomes a crate attribute #![plugin(bleh)] The feature gate is still required. It's almost never correct to link a plugin into the resulting library / executable, because it will bring all of libsyntax and librustc with it. However if you really want this behavior, you can get it with a separate `extern crate` item in addition to the `plugin` attribute. Fixes #21043. Fixes #20769. [breaking-change]
2015-02-09Review changesNick Cameron-31/+51
2015-02-09Refactor compilation to make it easier to use for toolsNick Cameron-171/+305
2015-02-07Feature-gate #![no_std]Keegan McAllister-1/+1
Fixes #21833. [breaking-change]
2015-02-07Auto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichtonbors-1/+1
It's in order to make the code more homogeneous.
2015-02-06librustc_driver has been updatedGuillaumeGomez-1/+1
2015-02-06Rollup merge of #21958 - brson:stable-features, r=alexcrichtonManish Goregaokar-2/+2
.... The 'stable_features' lint helps people progress from unstable to stable Rust by telling them when they no longer need a `feature` attribute because upstream Rust has declared it stable. This compares to the existing 'unstable_features' lint, which is used to implement feature staging, and triggers on *any* use of `#[feature]`.
2015-02-06Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnikManish Goregaokar-1/+1
The spelling corrections were made in both documentation comments and regular comments.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-17/+17
2015-02-04Add a lint for writing `#[feature]` for stable features, warn by default.Brian Anderson-2/+2
The 'stable_features' lint helps people progress from unstable to stable Rust by telling them when they no longer need a `feature` attribute because upstream Rust has declared it stable. This compares to the existing 'unstable_features', which is used to implement feature staging, and triggers on *any* use of `#[feature]`.
2015-02-04Fix for misspelled comments.Joseph Crail-1/+1
The spelling corrections were made in both documentation comments and regular comments.
2015-02-04remove all kind annotations from closuresJorge Aparicio-8/+8
2015-02-04More test fixesManish Goregaokar-2/+1
2015-02-04Error when #![staged_api] crates are missing stability markersManish Goregaokar-1/+1
2015-02-04Move stability pass after privacy passManish Goregaokar-4/+5
2015-02-03Auto merge of #21613 - alfie:suffix-small, r=alexcrichtonbors-3/+3
2015-02-02More deprecating of i/u suffixesAlfie John-3/+3
2015-02-02rollup merge of #21830: japaric/for-cleanupAlex Crichton-15/+15
Conflicts: src/librustc/metadata/filesearch.rs src/librustc_back/target/mod.rs src/libstd/os.rs src/libstd/sys/windows/os.rs src/libsyntax/ext/tt/macro_parser.rs src/libsyntax/print/pprust.rs src/test/compile-fail/issue-2149.rs
2015-02-02`for x in xs.into_iter()` -> `for x in xs`Jorge Aparicio-5/+5
Also `for x in option.into_iter()` -> `if let Some(x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-10/+10
2015-02-01std: Add a new `env` moduleAlex Crichton-17/+19
This is an implementation of [RFC 578][rfc] which adds a new `std::env` module to replace most of the functionality in the current `std::os` module. More details can be found in the RFC itself, but as a summary the following methods have all been deprecated: [rfc]: https://github.com/rust-lang/rfcs/pull/578 * `os::args_as_bytes` => `env::args` * `os::args` => `env::args` * `os::consts` => `env::consts` * `os::dll_filename` => no replacement, use `env::consts` directly * `os::page_size` => `env::page_size` * `os::make_absolute` => use `env::current_dir` + `join` instead * `os::getcwd` => `env::current_dir` * `os::change_dir` => `env::set_current_dir` * `os::homedir` => `env::home_dir` * `os::tmpdir` => `env::temp_dir` * `os::join_paths` => `env::join_paths` * `os::split_paths` => `env::split_paths` * `os::self_exe_name` => `env::current_exe` * `os::self_exe_path` => use `env::current_exe` + `pop` * `os::set_exit_status` => `env::set_exit_status` * `os::get_exit_status` => `env::get_exit_status` * `os::env` => `env::vars` * `os::env_as_bytes` => `env::vars` * `os::getenv` => `env::var` or `env::var_string` * `os::getenv_as_bytes` => `env::var` * `os::setenv` => `env::set_var` * `os::unsetenv` => `env::remove_var` Many function signatures have also been tweaked for various purposes, but the main changes were: * `Vec`-returning APIs now all return iterators instead * All APIs are now centered around `OsString` instead of `Vec<u8>` or `String`. There is currently on convenience API, `env::var_string`, which can be used to get the value of an environment variable as a unicode `String`. All old APIs are `#[deprecated]` in-place and will remain for some time to allow for migrations. The semantics of the APIs have been tweaked slightly with regard to dealing with invalid unicode (panic instead of replacement). The new `std::env` module is all contained within the `env` feature, so crates must add the following to access the new APIs: #![feature(env)] [breaking-change]
2015-01-30Merge remote-tracking branch 'origin/master' into rollupAlex Crichton-4/+1
Conflicts: src/liballoc/lib.rs src/libcore/ops.rs
2015-01-30Test fixes and rebase conflictsAlex Crichton-6/+5
Also some tidying up of a bunch of crate attributes
2015-01-30rollup merge of #21739: alexcrichton/better-printAlex Crichton-1/+1
Closes rust-lang/cargo#1234
2015-01-30std: Stabilize FromStr and parseAlex Crichton-8/+6
This commits adds an associated type to the `FromStr` trait representing an error payload for parses which do not succeed. The previous return value, `Option<Self>` did not allow for this form of payload. After the associated type was added, the following attributes were applied: * `FromStr` is now stable * `FromStr::Err` is now stable * `FromStr::from_str` is now stable * `StrExt::parse` is now stable * `FromStr for bool` is now stable * `FromStr for $float` is now stable * `FromStr for $integral` is now stable * Errors returned from stable `FromStr` implementations are stable * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`) Closes #15138
2015-01-30Remove the capture mode map and just store the capture mode for individual ↵Niko Matsakis-4/+1
variables. Also add test. Fixes #16749.
2015-01-29s/Show/Debug/gJorge Aparicio-4/+4
2015-01-28rustc: Print out a prettier version of crate typesAlex Crichton-1/+1
Closes rust-lang/cargo#1234
2015-01-27Merge remote-tracking branch 'rust-lang/master'Brian Anderson-27/+27
Conflicts: src/libcore/cell.rs src/librustc_driver/test.rs src/libstd/old_io/net/tcp.rs src/libstd/old_io/process.rs
2015-01-27accommodate new scoping rules in librustc_driver unit tests.Felix S. Klock II-1/+1
2015-01-27accommodate new scoping rules in rustc and rustdoc source.Felix S. Klock II-1/+1
2015-01-26Fallout of io => old_ioAlex Crichton-24/+24
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-7/+23
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-23Set unstable feature names appropriatelyBrian Anderson-2/+10
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else