Skip to content

Commit f1616f3

Browse files
committed
---
yaml --- r: 83735 b: refs/heads/try c: d7b2c70 h: refs/heads/master i: 83733: 33ebf67 83731: e3da8f8 83727: 7669aa7 v: v3
1 parent 0329fbe commit f1616f3

File tree

18 files changed

+20
-346
lines changed

18 files changed

+20
-346
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: dd98f7089fec5ee8bc908089bcb89c6e352d8726
5+
refs/heads/try: d7b2c70a1335b866a26b63bcf13da67328b0cf3c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/rust.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,58 +1833,6 @@ fn main() {
18331833
> individual functions, structs, methods and enum variants, *not* to
18341834
> entire modules, traits, impls or enums themselves.
18351835
1836-
### Compiler Features
1837-
1838-
Certain aspects of Rust may be implemented in the compiler, but they're not
1839-
necessarily ready for every-day use. These features are often of "prototype
1840-
quality" or "almost production ready", but may not be stable enough to be
1841-
considered a full-fleged language feature.
1842-
1843-
For this reason, rust recognizes a special crate-level attribute of the form:
1844-
1845-
~~~ {.xfail-test}
1846-
#[feature(feature1, feature2, feature3)]
1847-
~~~
1848-
1849-
This directive informs the compiler that the feature list: `feature1`,
1850-
`feature2`, and `feature3` should all be enabled. This is only recognized at a
1851-
crate-level, not at a module-level. Without this directive, all features are
1852-
considered off, and using the features will result in a compiler error.
1853-
1854-
The currently implemented features of the compiler are:
1855-
1856-
* `macro_rules` - The definition of new macros. This does not encompass
1857-
macro-invocation, that is always enabled by default, this only
1858-
covers the definition of new macros. There are currently
1859-
various problems with invoking macros, how they interact with
1860-
their environment, and possibly how they are used outside of
1861-
location in which they are defined. Macro definitions are
1862-
likely to change slightly in the future, so they are currently
1863-
hidden behind this feature.
1864-
1865-
* `globs` - Importing everything in a module through `*`. This is currently a
1866-
large source of bugs in name resolution for Rust, and it's not clear
1867-
whether this will continue as a feature or not. For these reasons,
1868-
the glob import statement has been hidden behind this feature flag.
1869-
1870-
* `struct_variant` - Structural enum variants (those with named fields). It is
1871-
currently unknown whether this style of enum variant is as
1872-
fully supported as the tuple-forms, and it's not certain
1873-
that this style of variant should remain in the language.
1874-
For now this style of variant is hidden behind a feature
1875-
flag.
1876-
1877-
If a feature is promoted to a language feature, then all existing programs will
1878-
start to receive compilation warnings about #[feature] directives which enabled
1879-
the new feature (because the directive is no longer necessary). However, if
1880-
a feature is decided to be removed from the language, errors will be issued (if
1881-
there isn't a parser error first). The directive in this case is no longer
1882-
necessary, and it's likely that existing code will break if the feature isn't
1883-
removed.
1884-
1885-
If a unknown feature is found in a directive, it results in a compiler error. An
1886-
unknown feature is one which has never been recognized by the compiler.
1887-
18881836
# Statements and expressions
18891837

18901838
Rust is _primarily_ an expression language. This means that most forms of

branches/try/doc/tutorial.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -746,10 +746,6 @@ fn area(sh: Shape) -> f64 {
746746
}
747747
~~~~
748748

749-
> ***Note:*** This feature of the compiler is currently gated behind the
750-
> `#[feature(struct_variant)]` directive. More about these directives can be
751-
> found in the manual.
752-
753749
## Tuples
754750

755751
Tuples in Rust behave exactly like structs, except that their fields
@@ -2669,10 +2665,6 @@ use farm::*;
26692665
# fn main() { cow(); chicken() }
26702666
~~~
26712667

2672-
> ***Note:*** This feature of the compiler is currently gated behind the
2673-
> `#[feature(globs)]` directive. More about these directives can be found in
2674-
> the manual.
2675-
26762668
However, that's not all. You can also rename an item while you're bringing it into scope:
26772669

26782670
~~~

branches/try/src/libextra/extra.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ Rust extras are part of the standard Rust distribution.
3333
#[license = "MIT/ASL2"];
3434
#[crate_type = "lib"];
3535

36-
#[feature(macro_rules, globs)];
37-
3836
#[deny(non_camel_case_types)];
3937
#[deny(missing_doc)];
4038

branches/try/src/librustc/driver/driver.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ pub fn phase_2_configure_and_expand(sess: Session,
159159
*sess.building_library = session::building_library(sess.opts.crate_type,
160160
&crate, sess.opts.test);
161161

162-
time(time_passes, ~"gated feature checking", (), |_|
163-
front::feature_gate::check_crate(sess, &crate));
164162

165163
// strip before expansion to allow macros to depend on
166164
// configuration variables e.g/ in

branches/try/src/librustc/front/feature_gate.rs

Lines changed: 0 additions & 176 deletions
This file was deleted.

branches/try/src/librustc/middle/typeck/check/regionmanip.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ pub fn replace_bound_regions_in_fn_sig(
3232
{
3333
let mut all_tys = ty::tys_in_fn_sig(fn_sig);
3434

35-
for &self_ty in opt_self_ty.iter() {
36-
all_tys.push(self_ty);
37-
}
38-
3935
for &t in opt_self_ty.iter() { all_tys.push(t) }
4036

4137
debug2!("replace_bound_regions_in_fn_sig(self_ty={:?}, fn_sig={}, \

branches/try/src/librustc/rustc.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#[license = "MIT/ASL2"];
1818
#[crate_type = "lib"];
1919

20-
#[feature(macro_rules, globs, struct_variant)];
21-
2220
// Rustc tasks always run on a fixed_stack_segment, so code in this
2321
// module can call C functions (in particular, LLVM functions) with
2422
// impunity.
@@ -85,7 +83,6 @@ pub mod front {
8583
pub mod test;
8684
pub mod std_inject;
8785
pub mod assign_node_ids;
88-
pub mod feature_gate;
8986
}
9087

9188
pub mod back {

branches/try/src/librustdoc/rustdoc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#[license = "MIT/ASL2"];
1818
#[crate_type = "lib"];
1919

20-
#[feature(globs, struct_variant)];
21-
2220
extern mod syntax;
2321
extern mod rustc;
2422
extern mod extra;

branches/try/src/librusti/rusti.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@
6666
#[license = "MIT/ASL2"];
6767
#[crate_type = "lib"];
6868

69-
#[feature(globs)];
70-
7169
extern mod extra;
7270
extern mod rustc;
7371
extern mod syntax;

branches/try/src/librustpkg/rustpkg.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#[license = "MIT/ASL2"];
1919
#[crate_type = "lib"];
2020

21-
#[feature(globs)];
22-
2321
extern mod extra;
2422
extern mod rustc;
2523
extern mod syntax;

branches/try/src/librustpkg/util.rs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ use context::{in_target, StopBefore, Link, Assemble, BuildContext};
2727
use package_id::PkgId;
2828
use package_source::PkgSrc;
2929
use workspace::pkg_parent_workspaces;
30-
use path_util::{installed_library_in_workspace, U_RWX, rust_path, system_library, target_build_dir};
31-
use messages::error;
32-
use conditions::nonexistent_package::cond;
33-
30+
use path_util::{installed_library_in_workspace, U_RWX, system_library, target_build_dir};
31+
use path_util::default_workspace;
3432
pub use target::{OutputType, Main, Lib, Bench, Test, JustOne, lib_name_of, lib_crate_filename};
3533
use workcache_support::{digest_file_with_date, digest_only_date};
3634

@@ -432,26 +430,26 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
432430
lib_name.to_str());
433431
// Try to install it
434432
let pkg_id = PkgId::new(lib_name);
433+
// Find all the workspaces in the RUST_PATH that contain this package.
435434
let workspaces = pkg_parent_workspaces(&self.context.context,
436435
&pkg_id);
437-
let source_workspace = if workspaces.is_empty() {
438-
error(format!("Couldn't find package {} \
439-
in any of the workspaces in the RUST_PATH ({})",
440-
lib_name,
441-
rust_path().map(|s| s.to_str()).connect(":")));
442-
cond.raise((pkg_id.clone(), ~"Dependency not found"))
443-
}
444-
else {
445-
workspaces[0]
446-
};
436+
// Two cases:
437+
// (a) `workspaces` is empty. That means there's no local source
438+
// for this package. In that case, we pass the default workspace
439+
// into `PkgSrc::new`, so that if it exists as a remote repository,
440+
// its sources will be fetched into it.
441+
// (b) `workspaces` is non-empty -- we found a local source for this
442+
// package.
443+
let dest_workspace = if workspaces.is_empty() {
444+
default_workspace()
445+
} else { workspaces[0] };
446+
let pkg_src = PkgSrc::new(dest_workspace,
447+
// Use the rust_path_hack to search for dependencies iff
448+
// we were already using it
449+
self.context.context.use_rust_path_hack,
450+
pkg_id);
447451
let (outputs_disc, inputs_disc) =
448-
self.context.install(PkgSrc::new(source_workspace.clone(),
449-
// Use the rust_path_hack to search for dependencies iff
450-
// we were already using it
451-
self.context.context.use_rust_path_hack,
452-
pkg_id),
453-
&JustOne(Path(
454-
lib_crate_filename)));
452+
self.context.install(pkg_src, &JustOne(Path(lib_crate_filename)));
455453
debug2!("Installed {}, returned {:?} dependencies and \
456454
{:?} transitive dependencies",
457455
lib_name, outputs_disc.len(), inputs_disc.len());

0 commit comments

Comments
 (0)