summary refs log tree commit diff
path: root/src/librustc/plugin/load.rs
AgeCommit message (Collapse)AuthorLines
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-1/+1
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-03-27Updated std::dynamic_lib to use std::path.Aaron Weiss-5/+0
2015-03-12Stabilize std::pathAaron Turon-0/+4
This commit stabilizes essentially all of the new `std::path` API. The API itself is changed in a couple of ways (which brings it in closer alignment with the RFC): * `.` components are now normalized away, unless they appear at the start of a path. This in turn effects the semantics of e.g. asking for the file name of `foo/` or `foo/.`, both of which yield `Some("foo")` now. This semantics is what the original RFC specified, and is also desirable given early experience rolling out the new API. * The `parent` function now succeeds if, and only if, the path has at least one non-root/prefix component. This change affects `pop` as well. * The `Prefix` component now involves a separate `PrefixComponent` struct, to better allow for keeping both parsed and unparsed prefix data. In addition, the `old_path` module is now deprecated. Closes #23264 [breaking-change]
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-5/+8
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-02-24std: Move std::env to the new I/O APIsAlex Crichton-2/+2
This commit moves `std::env` away from the `std::old_io` error type as well as the `std::old_path` module. Methods returning an error now return `io::Error` and methods consuming or returning paths use `std::path` instead of `std::old_path`. This commit does not yet mark these APIs as `#[stable]`. This commit also migrates `std::old_io::TempDir` to `std::fs::TempDir` with essentially the exact same API. This type was added to interoperate with the new path API and has its own `tempdir` feature. Finally, this commit reverts the deprecation of `std::os` APIs returning the old path API types. This deprecation can come back once the entire `std::old_path` module is deprecated. [breaking-change]
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-3/+3
2015-02-12Separate macro and plugin loadingKeegan McAllister-167/+12
Now they just share a bit of code internal to creader. Resolves #22198 to my satisfaction.
2015-02-12creader: Clean up macro/plugin APIKeegan McAllister-27/+13
Step towards #22198.
2015-02-10Forbid undefined names in macro use / macro reexportKeegan McAllister-26/+41
Fixes #21062.
2015-02-09Add a help message for deprecated #[plugin] extern crateKeegan McAllister-0/+3
2015-02-09Use a crate attribute to load pluginsKeegan McAllister-42/+55
#[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-06librustc has been updatedGuillaumeGomez-1/+1
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-2/+2
2015-02-02rollup merge of #21830: japaric/for-cleanupAlex Crichton-6/+6
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-1/+1
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-5/+5
2015-02-01std: Add a new `env` moduleAlex Crichton-2/+2
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-21rustc: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-8/+16
2015-01-08librustc_driver: Add support for loading plugins via command line (fixes #15446)Manish Goregaokar-19/+18
2015-01-08librustc::plugin : make PluginLoader usable for loading argument-specified ↵Manish Goregaokar-17/+39
plugins
2015-01-08librustc::metadata : Allow passing a string to read_plugin_metadataManish Goregaokar-2/+2
2015-01-07use slicing sugarJorge Aparicio-3/+3
2015-01-07Replace full slice notation with index callsNick Cameron-3/+3
2015-01-05Forbid '#[macro_use] extern crate' outside the crate rootKeegan McAllister-0/+16
2015-01-05Pass the #[plugin(...)] meta item to the registrarKeegan McAllister-7/+25
2015-01-05Allow selective macro importKeegan McAllister-5/+28
2015-01-05Move #[macro_reexport] to extern crateKeegan McAllister-1/+27
2015-01-05Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]Keegan McAllister-12/+22
2015-01-05creader: Load parts of plugin metadata on demandKeegan McAllister-32/+27
2015-01-05Reformat metadata for exported macrosKeegan McAllister-20/+13
Instead of copy-pasting the whole macro_rules! item from the original .rs file, we serialize a separate name, attributes list, and body, the latter as pretty-printed TTs. The compilation of macro_rules! macros is decoupled somewhat from the expansion of macros in item position. This filters out comments, and facilitates selective imports.
2015-01-05creader: Use a single structKeegan McAllister-3/+3
2014-12-21Fallout of std::str stabilizationAlex Crichton-3/+3
2014-11-19Make os::getcwd() return IoResult<Path>Barosl Lee-1/+1
os::getcwd() panics if the current directory is not available. According to getcwd(3), there are three cases: - EACCES: Permission denied. - ENOENT: The current working directory has been removed. - ERANGE: The buffer size is less than the actual absolute path. This commit makes os::getcwd() return IoResult<Path>, not just Path, preventing it from panicking. As os::make_absolute() depends on os::getcwd(), it is also modified to return IoResult<Path>. Fixes #16946. [breaking-change]
2014-11-18Move trans, back, driver, and back into a new crate, rustc_trans. Reduces ↵Niko Matsakis-1/+1
memory usage significantly and opens opportunities for more parallel compilation.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-2/+2
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-09-12Track the visited AST's lifetime throughout Visitor.Eduard Burtescu-1/+1
2014-09-12Remove largely unused context from Visitor.Eduard Burtescu-4/+4
2014-07-21rustc: Pass optional additional plugins to compile_inputBrian Anderson-2/+16
This provides a way for clients of the rustc library to add their own features to the pipeline.
2014-07-11make walk/visit_mac opt-in onlyJohn Clements-0/+5
macros can expand into arbitrary items, exprs, etc. This means that using a default walker or folder on an AST before macro expansion is complete will miss things (the things that the macros expand into). As a partial fence against this, this commit moves the default traversal of macros into a separate procedure, and makes the default trait implementation signal an error. This means that Folders and Visitors can traverse macros if they want to, but they need to explicitly add an impl that calls the walk_mac or fold_mac procedure This should prevent problems down the road.
2014-06-28Rename all raw pointers as necessaryAlex Crichton-1/+1
2014-06-13librustc: Forbid `transmute` from being called on types whose size isPatrick Walton-2/+4
only known post-monomorphization, and report `transmute` errors before the code is generated for that `transmute`. This can break code that looked like: unsafe fn f<T>(x: T) { let y: int = transmute(x); } Change such code to take a type parameter that has the same size as the type being transmuted to. Closes #12898. [breaking-change]
2014-06-09std: Move dynamic_lib from std::unstable to stdBrian Anderson-1/+1
This leaves a deprecated reexport in place temporarily. Closes #1457.
2014-06-09Document rustc::pluginKeegan McAllister-1/+15
2014-06-09Implement #[plugin_registrar]Keegan McAllister-0/+131
See RFC 22. [breaking-change]