Commit Graph

51811 Commits

Author SHA1 Message Date
Eduard Burtescu
1d7c9bd137 trans: use sizing_type_of for interacting with potentially incomplete types. 2016-03-17 21:51:51 +02:00
Eduard Burtescu
d492d09f31 trans: Apply ZExt and StructRet attributes uniformly. 2016-03-17 21:51:51 +02:00
Eduard Burtescu
ac60318cf5 trans: Only mutate ArgTy's in C ABI handling, don't create them. 2016-03-17 21:51:51 +02:00
Eduard Burtescu
03942056aa trans: Handle type_of for Rust fn's via abi::FnType. 2016-03-17 21:51:51 +02:00
Eduard Burtescu
f6bbbe1070 trans: Remove dropflag-unaware type_is_newtype_immediate shortcut. 2016-03-17 21:51:51 +02:00
Eduard Burtescu
cf0ea786ff tests: Force instantiation of extern fns. 2016-03-17 21:51:50 +02:00
Eduard Burtescu
200d001784 trans: Pass fat pointers as two arguments even for FFI. 2016-03-17 21:51:50 +02:00
Eduard Burtescu
3342da4113 trans: Don't treat closure types like function types in declare. 2016-03-17 21:51:50 +02:00
Eduard Burtescu
da66431d06 trans: Combine cabi and back::abi into abi. 2016-03-17 21:51:50 +02:00
Eduard Burtescu
cdfad40735 trans: Condense the fn instantiation logic into callee. 2016-03-17 21:51:47 +02:00
Eduard Burtescu
b05556e06d trans: Rename MonoId to Instance and start using it in more places. 2016-03-17 21:51:32 +02:00
Katze
a6e077ebdf
documentation fix in RELEASES.md
f32 should probably be denoted as 0.0 as it might improve readability.

Signed-off-by: benaryorg <binary@benary.org>
2016-03-17 20:33:01 +01:00
bors
b12b4e4e32 Auto merge of #32294 - Manishearth:derive-fix, r=alexcrichton
Re-add double underscores in derive (fixes #32292)

@durka, sanity-check, please?

<s>Don't merge this yet, I need to add a test and test it locally.</s>

ready for review
2016-03-17 11:08:44 -07:00
Tang Chenglong
79244c3a6b let introduces a statement
I changes *expression* to *statement* to make more accurate, because in Rust, `let` introduces a declaration statement.
2016-03-18 01:17:19 +08:00
Alex Crichton
af65d81490 std: Revert addition of into_ascii_* methods
The addition of these methods in #31335 required adding impls of the trait for
the `String` and `Vec<T>` types. This unfortunately caused a regression (#32074)
in type inference for using these methods which the libs team has decided to not
push forward with. These methods were stabilized in #32020 which was intended to
get backported to beta, but the backport hasn't happened just yet. This commit
reverts both the addition and stabilization of these methods.

One proposed method of handling this, in #32076, was to move the methods to an
extra trait to avoid conflicts with type inference. After some discussion,
however, the libs team concluded that we probably want to reevaluate what we're
doing here, so discussion will continue on the tracking issue, #27809.
2016-03-17 09:39:10 -07:00
Eduard Burtescu
d6e72c48dd trans: Don't store extra copies of intrinsics ID/substs. 2016-03-17 18:19:50 +02:00
Eduard Burtescu
89766a81ef trans: use Cell instead of RefCell where it suffices. 2016-03-17 18:19:50 +02:00
Eduard Burtescu
b122d1636a trans: simplify the declare interface. 2016-03-17 18:19:50 +02:00
Eduard Burtescu
c6d214bdeb trans: Revamp and empower cabi::FnType. 2016-03-17 18:19:50 +02:00
Eduard Burtescu
9221b9118b trans: Pass the Rust type for the closure env in type_of_rust_fn. 2016-03-17 18:19:29 +02:00
Eduard Burtescu
7011e30352 trans: Remove the old ExprOrMethodCall. 2016-03-17 18:19:29 +02:00
Eduard Burtescu
55b5a365ef trans: Remove unused return type argument from declare_cfn. 2016-03-17 18:19:29 +02:00
Eduard Burtescu
5af3c12cfc trans: Move static item handling to consts. 2016-03-17 18:19:29 +02:00
Eduard Burtescu
c3f856e7e2 trans: Remove dead code for variants and structs from get_item_val. 2016-03-17 18:19:29 +02:00
Eduard Burtescu
e0970498c7 trans: Move trans_foreign_mod and trans_impl to trans_item. 2016-03-17 18:19:29 +02:00
Eduard Burtescu
16201d45f1 trans: Get functions and do calls only through Callee. 2016-03-17 17:52:30 +02:00
Eduard Burtescu
062a05dde8 metadata: Constrain FoundAst::FoundParent to an Item. 2016-03-17 17:51:58 +02:00
Eduard Burtescu
b918e37eb3 metedata: Remove the unnecessary indirection to astencode. 2016-03-17 17:51:58 +02:00
Eduard Burtescu
9723a3bc37 Move simd_ffi gating from trans to typeck. 2016-03-17 17:51:58 +02:00
Eduard Burtescu
b47fcb8375 trans: Use fmt::Debug for debugging instead of ad-hoc methods. 2016-03-17 17:51:58 +02:00
York Xiang
2910c00206 Fix usability problem when browse document locally 2016-03-18 00:49:15 +09:00
bors
be989acabd Auto merge of #32263 - frewsxcv:compiletest-ignored-expected, r=nikomatsakis
Stop ignoring expected note/help messages in compiletest suite.

Original issue: https://github.com/rust-lang/rust/issues/21195

Relevant PR: https://github.com/rust-lang/rust/pull/30778

Prior to this commit, if a compiletest testcase included the text
"HELP:" or "NOTE:" (note the colons), then it would indicate to the
compiletest suite that we should verify "help" and "note" expected
messages.

This commit updates this check to also check "HELP" and "NOTE" (not the
absense of colons) so that we always verify "help" and "note" expected
messages.
2016-03-17 07:52:30 -07:00
Jeffrey Seyfried
ed8a2e230d Add test 2016-03-17 11:53:18 +00:00
Jeffrey Seyfried
ae4e1082d4 Disallow methods from shadowed traits 2016-03-17 11:50:38 +00:00
bors
abb1515c53 Auto merge of #32237 - alexcrichton:rustbuild-make-dist, r=brson
rustbuild: Implement `make dist`

This commit implements the `make dist` command in the new rustbuild build
system, porting over `dist.mk` and `prepare.mk` into Rust. There's a huge amount
of complexity between those two files, not all of which is likely justified, so
the Rust implementation is *much* smaller.

Currently the implementation still shells out to rust-installer as well as some
python scripts, but ideally we'd rewrite it all in the future to not shell out
and be in Rust proper.
2016-03-17 02:35:32 -07:00
pravic
4cbfe1582a test: Fix missing call of function pointer
Also an unused variable warning was here.
2016-03-17 12:05:22 +03:00
bors
3b765f44a6 Auto merge of #32285 - oli-obk:fix/const_bitshift, r=eddyb
const eval: don't assume the rhs of a bitshift is of any particular type

[regression found](https://internals.rust-lang.org/t/regression-report-stable-2016-03-03-vs-nightly-2016-03-15/3250) in jpeg-decoder
2016-03-16 19:44:30 -07:00
Manish Goregaokar
52e064c39d Add test for silenced unused params in derive 2016-03-17 08:11:46 +05:30
Manish Goregaokar
76b3523ac0 Re-add double underscores in derive (fixes #32292) 2016-03-17 08:11:44 +05:30
Corey Farwell
abd1cea145 Stop ignoring expected note/help messages in compiletest suite.
Original issue: https://github.com/rust-lang/rust/issues/21195

Relevant PR: https://github.com/rust-lang/rust/pull/30778

Prior to this commit, if a compiletest testcase included the text
"HELP:" or "NOTE:" (note the colons), then it would indicate to the
compiletest suite that we should verify "help" and "note" expected
messages.

This commit updates this check to also check "HELP" and "NOTE" (not the
absense of colons) so that we always verify "help" and "note" expected
messages.
2016-03-16 21:53:58 -04:00
Alex Crichton
6cc06b36c4 rustbuild: Implement make dist
This commit implements the `make dist` command in the new rustbuild build
system, porting over `dist.mk` and `prepare.mk` into Rust. There's a huge amount
of complexity between those two files, not all of which is likely justified, so
the Rust implementation is *much* smaller.

Currently the implementation still shells out to rust-installer as well as some
python scripts, but ideally we'd rewrite it all in the future to not shell out
and be in Rust proper.
2016-03-16 17:15:55 -07:00
bors
6e0f2f2f05 Auto merge of #32284 - jseyfried:name_conflict_diagnostics, r=eddyb
Resolve: improve diagnostics for duplicate definitions and imports

This PR improves and regularizes the diagnostics for duplicate definitions and imports.

After this PR, the second of two duplicate definitions/imports will have the following form:
> a(n) [value|type|module|trait|extern crate] named \`*name*\` has already been [defined|imported] in this [module|block|trait|enum]

with a note referencing this first of the two duplicate definitions/imports:
> previous [definition|import] of \`*name*\` here

The error indices remain unchanged.

r? @eddyb
2016-03-16 16:18:12 -07:00
bors
eeb062b8b1 Auto merge of #31746 - erickt:newline, r=sfackler
syntax: Always pretty print a newline after doc comments

Before this patch, code that had a doc comment as the first
line, as in:

```rust
/// Foo
struct Foo;
```

Was pretty printed into:

```rust
///Foostruct Foo;
```

This makes sure that that there is always a trailing newline
after a doc comment.

Closes #31722
2016-03-16 14:20:36 -07:00
Tang Chenglong
01d76099f2 docs: One typo
I think it's a mistake of spelling.
2016-03-16 23:45:28 +08:00
bors
fd5603b6fc Auto merge of #32228 - jonas-schievink:diag1, r=sanxiyn
Normalize return type when checking for E0269

Fixes #31597

First time dealing with normalization. Maybe `normalize_associated_type` would be better here, but it seems to imply it's only used during trans.
2016-03-16 08:02:15 -07:00
bors
e68d40edf4 Auto merge of #32280 - japaric:rt, r=alexcrichton
update compiler-rt submodule

fixes #32194

also see rust-lang/compiler-rt#17

r? @alexcrichton
2016-03-16 05:26:06 -07:00
Jonas Schievink
96d9408dd9 Resolve conflicts and extend the test 2016-03-16 13:22:35 +01:00
Jonas Schievink
4dbb01ff65 Use fully_normalize, unwrapping its result 2016-03-16 12:19:58 +01:00
Jonas Schievink
f0b0a4ff2a Normalize return type when checking for E0269
Fixes #31597
2016-03-16 12:19:58 +01:00
bors
9afa5a13cc Auto merge of #32273 - alexcrichton:fix-time-sub, r=aturon
std: Fix overflow when subtracting Instant

This code was currently only exercised on OSX, but this applies the same method
of subtraction used on Linux which doesn't have the same overflow issues.

Note that this currently includes no tests, but that's because this is only
visible with debug assertions enabled. Soon, however, I'll enable debug
assertions on all auto builds on the bots so we should get testing for this.

Closes #32268
2016-03-16 02:58:35 -07:00