Commit Graph

36885 Commits

Author SHA1 Message Date
bors
5364c4853f auto merge of #20737 : aturon/rust/stab-stragglers, r=alexcrichton
Marks `vec`, `char` and `fmt` as stable module names.
2015-01-08 09:04:49 +00:00
Aaron Turon
e7d00ebec7 Add missing module stability attributes 2015-01-08 00:26:21 -08:00
Manish Goregaokar
0bd022c893 libsyntax: add COMMAND_LINE_SP and use it for spans generated from the command line 2015-01-08 13:40:50 +05:30
Manish Goregaokar
c41cafb10c librustc_driver: Add support for loading plugins via command line (fixes #15446) 2015-01-08 13:40:50 +05:30
Manish Goregaokar
9f5f706f96 librustc::plugin : make PluginLoader usable for loading argument-specified plugins 2015-01-08 13:40:48 +05:30
Manish Goregaokar
efaf613497 librustc::metadata : Allow passing a string to read_plugin_metadata 2015-01-08 13:39:27 +05:30
Manish Goregaokar
7e87ea9fc5 librustc::session : Make DebuggingOpts use the options! macro 2015-01-08 13:38:43 +05:30
Manish Goregaokar
3248bc5bd0 librustc::session : Make cgoptions macro more generic 2015-01-08 13:37:50 +05:30
Akos Kiss
78c7faf5a6 Fix: libc::c_char is not always i8 2015-01-08 07:12:19 +00:00
Tshepang Lekhonkhobe
0f4ee2d87e bench: fix a few compiler warnings 2015-01-08 09:11:16 +02:00
Kevin Rauwolf
b88ae323d1 Spelling fix compatibel -> compatible 2015-01-07 21:47:15 -08:00
bors
5b3cd3900c auto merge of #20733 : alexcrichton/rust/rollup, r=alexcrichton 2015-01-08 05:35:51 +00:00
Alex Crichton
0abf458348 More test fixes and rebase conflicts 2015-01-07 20:08:37 -08:00
Alex Crichton
ef46caebcc rollup merge of #20731: nick29581/assoc-inherant 2015-01-07 19:30:20 -08:00
Alex Crichton
0dc48b47a8 Test fixes and rebase conflicts 2015-01-07 19:27:27 -08:00
Nick Cameron
4d98cbb3f3 Forbid associated items in inherent impls
Closes #20359
2015-01-08 15:43:00 +13:00
Alex Crichton
11e265c2e0 rollup merge of #20707: nikomatsakis/issue-20582 2015-01-07 17:44:24 -08:00
Alex Crichton
373cbab5b0 rollup merge of #20723: pnkfelix/feature-gate-box-syntax
Conflicts:
	src/compiletest/compiletest.rs
	src/libcollections/lib.rs
	src/libserialize/lib.rs
	src/libsyntax/feature_gate.rs
2015-01-07 17:42:47 -08:00
Felix S. Klock II
ae4bcd41e8 fallout: part of changes to compile-fail tests. (follows same pattern as prior two commits.) 2015-01-08 02:41:23 +01:00
Alex Crichton
d11bfba71b rollup merge of #20720: nick29581/assoc-ice-missing 2015-01-07 17:38:03 -08:00
Felix S. Klock II
d859816715 fallout: run-fail tests that use box. (many/all could be ported to Box::new instead.) 2015-01-08 02:37:58 +01:00
Alex Crichton
6621325601 rollup merge of #20657: alexcrichton/stabilize-macros 2015-01-07 17:36:16 -08:00
Nick Cameron
68a783a89f Remove String impls and fix for make tidy 2015-01-08 14:35:53 +13:00
Alex Crichton
bcebec5084 rollup merge of #20706: nikomatsakis/assoc-types-projections-in-structs-issue-20470
Conflicts:
	src/librustc_trans/trans/expr.rs
2015-01-07 17:35:00 -08:00
Alex Crichton
51357e04be rollup merge of #20665: nikomatsakis/assoc-types-method-dispatch-projection
Conflicts:
	src/librustc/middle/ty.rs
2015-01-07 17:33:41 -08:00
Felix S. Klock II
a7a2dd96ec fallout: run-pass tests that use box. (many could be ported to Box::new instead in the future.) 2015-01-08 02:31:37 +01:00
Alex Crichton
6afda64d0d rollup merge of #20728: huonw/type-param-shadowing
Conflicts:
	src/librustc_typeck/check/wf.rs
2015-01-07 17:30:15 -08:00
Alex Crichton
773fdb3dbe rollup merge of #20631: huon/no-drop-and-copy 2015-01-07 17:28:38 -08:00
Huon Wilson
92cd8ea96a Prohibit type parameter shadowing with a clunky hammer.
This is a [breaking-change].

Change

    impl<T> Foo<T> {
        fn bar<T>(...

to (for example)

    impl<T> Foo<T> {
        fn bar<U>(...

Per RFC 459.

Closes #19390.
2015-01-08 12:27:28 +11:00
Alex Crichton
6e806bdefd rollup merge of #20721: japaric/snap
Conflicts:
	src/libcollections/vec.rs
	src/libcore/fmt/mod.rs
	src/librustc/lint/builtin.rs
	src/librustc/session/config.rs
	src/librustc_trans/trans/base.rs
	src/librustc_trans/trans/context.rs
	src/librustc_trans/trans/type_.rs
	src/librustc_typeck/check/_match.rs
	src/librustdoc/html/format.rs
	src/libsyntax/std_inject.rs
	src/libsyntax/util/interner.rs
	src/test/compile-fail/mut-pattern-mismatched.rs
2015-01-07 17:26:58 -08:00
Niko Matsakis
cb98c3d93a Normalize types of fields in struct literals during type-checking.
Fixes #20535.
2015-01-07 20:26:21 -05:00
Niko Matsakis
18f426e647 Update compile-fail test with new message that is generated as a
result of using `ty::type_is_sized`
2015-01-07 20:26:20 -05:00
Niko Matsakis
55c6a68f11 Add rather involved run-pass test case. 2015-01-07 20:26:20 -05:00
Niko Matsakis
4dd368b90a Normalize associated types in with_field_tys 2015-01-07 20:26:20 -05:00
Niko Matsakis
9e4e8823c7 Use ty::type_is_sized() so that we handle projection types properly. 2015-01-07 20:26:19 -05:00
Alex Crichton
f6a7dc5528 rollup merge of #20726: dgrunwald/require-parens-for-chained-comparison
[Rendered RFC](https://github.com/rust-lang/rfcs/blob/master/text/0558-require-parentheses-for-chained-comparisons.md)
2015-01-07 17:19:55 -08:00
Alex Crichton
cb344be99d rollup merge of #20725: tomjakubowski/rustdoc-misc
Conflicts:
	src/librustdoc/html/format.rs
2015-01-07 17:19:51 -08:00
Alex Crichton
a204dc56c9 rollup merge of #20722: alexcrichton/audit-show
Conflicts:
	src/libcollections/vec.rs
	src/libcore/fmt/mod.rs
	src/librustdoc/html/format.rs
2015-01-07 17:18:59 -08:00
Alex Crichton
a6bf7676a5 rollup merge of #20716: brson/RUST_DEBUG 2015-01-07 17:18:08 -08:00
Alex Crichton
4373db61f4 rollup merge of #20710: daboross/fix-stable-before-bracket
This changes a line that has `\n#[stable]}` to instead have `}\n#[stable]`.

The #[stable] has been before the bracket since b94bcbf56e.

This is a (very) minor change, and I have not built this locally because of my not-so-powerful machine.
2015-01-07 17:18:06 -08:00
Alex Crichton
5d342acba2 rollup merge of #20709: thiagopnts/ownership-guide-typo
I was reading the ownership guide and found this small typo :bowtie:
2015-01-07 17:18:05 -08:00
Alex Crichton
dd38f46d71 rollup merge of #20708: aturon/new-int-modules
Conflicts:
	src/libserialize/lib.rs
2015-01-07 17:18:01 -08:00
Alex Crichton
b21a0cee19 rollup merge of #20704: alexcrichton/hopefully-make-tests-less-spurious
These tests have all been failing spuroiusly on Windows from time to time, and
one suspicion is that the shilc thread outliving the main thread somehow causes
the problem. Switch all the tests over to using Thread::scoped instead of
Thread::spawn to see if it helps the issue.

cc #19120
2015-01-07 17:17:34 -08:00
Alex Crichton
188bfbfd5d rollup merge of #20703: barosl/rustdoc-z-index-fallout
Due to the CSS changes done by the previous patch to make the line numbers clickable (#20092), the sidebar became unclickable. This PR reverts the changes and adopts an alternative approach.

I'm very sorry for having broken things.
2015-01-07 17:17:32 -08:00
Alex Crichton
f257848992 rollup merge of #20696: reem/unsized-typeid
This removes the needlessly constricting bound on `intrinsics::type_Id` and `TypeId::of`. Also fixes an ICE where using bounds on type parameters in extern blocks fails to resolve the used traits.
2015-01-07 17:17:31 -08:00
Alex Crichton
cedaf4696f rollup merge of #20695: frewsxcv/patch-2
This should be rollup
2015-01-07 17:17:29 -08:00
Alex Crichton
5b1a285b73 rollup merge of #20693: EchoAce/intro-oboe
Issue #20686, proposed by nstoddard.
2015-01-07 17:17:27 -08:00
Alex Crichton
3800f6417b rollup merge of #20688: jroesch/reject-non-param-bounds-followup
This is a follow up to my recent PR. r? @nikomatsakis
2015-01-07 17:17:25 -08:00
Alex Crichton
6301c7878e rollup merge of #20680: nick29581/target-word
Closes #20421

[breaking-change]

r? @brson
2015-01-07 17:17:23 -08:00
Alex Crichton
f3b67afcab rollup merge of #20663: brson/feature-staging
This partially implements the feature staging described in the
[release channel RFC][rc]. It does not yet fully conform to the RFC as
written, but does accomplish its goals sufficiently for the 1.0 alpha
release.

It has three primary user-visible effects:

* On the nightly channel, use of unstable APIs generates a warning.
* On the beta channel, use of unstable APIs generates a warning.
* On the beta channel, use of feature gates generates a warning.

Code that does not trigger these warnings is considered 'stable',
modulo pre-1.0 bugs.

Disabling the warnings for unstable APIs continues to be done in the
existing (i.e. old) style, via `#[allow(...)]`, not that specified in
the RFC. I deem this marginally acceptable since any code that must do
this is not using the stable dialect of Rust.

Use of feature gates is itself gated with the new 'unstable_features'
lint, on nightly set to 'allow', and on beta 'warn'.

The attribute scheme used here corresponds to an older version of the
RFC, with the `#[staged_api]` crate attribute toggling the staging
behavior of the stability attributes, but the user impact is only
in-tree so I'm not concerned about having to make design changes later
(and I may ultimately prefer the scheme here after all, with the
`#[staged_api]` crate attribute).

Since the Rust codebase itself makes use of unstable features the
compiler and build system do a midly elaborate dance to allow it to
bootstrap while disobeying these lints (which would otherwise be
errors because Rust builds with `-D warnings`).

This patch includes one significant hack that causes a
regression. Because the `format_args!` macro emits calls to unstable
APIs it would trigger the lint.  I added a hack to the lint to make it
not trigger, but this in turn causes arguments to `println!` not to be
checked for feature gates. I don't presently understand macro
expansion well enough to fix. This is bug #20661.

Closes #16678

[rc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md

Next steps are to disable the existing out-of-tree behavior for stability attributes, and convert the remaining system to be feature-based per the RFC. During the first beta cycle we will set these lints to 'forbid'.
2015-01-07 17:17:22 -08:00