Commit Graph

37111 Commits

Author SHA1 Message Date
John Kåre Alsaker
2c71adaaa2 Disable -C lto optimizations on opt_level=0
Fixes #21184
2015-01-15 09:22:27 +01:00
Flavio Percoco
de7b3cf02e Forbid impls for builtin traits on types that are not structs/enums 2015-01-15 08:53:37 +01:00
Diggory Blake
81c5fd8e1f Allow get_tydesc intrinsic to accept unsized types
Fix tabs

Added missing ty_str cases when generating type descriptions

Reduce code duplication and improve test
2015-01-15 06:54:51 +00:00
bors
0c96037ec1 auto merge of #20980 : richo/rust/final-power, r=alexcrichton
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it.

This gets you as far as being able to target powerpc with, eg:

    LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs

Would really love to get this out before 1.0. r? @alexcrichton
2015-01-15 05:12:30 +00:00
Nick Cameron
33fd10d5e0 save-analysis: fix declid of methods 2015-01-15 16:53:29 +13:00
Brian Anderson
e5ad89d176 Remove erroneous stability attribute.
This outer attribute doesn't actually apply to anything is seems
to be incorrect in what it is saying.
2015-01-14 18:58:26 -08:00
bors
451e134c18 auto merge of #20290 : jroesch/rust/generalize-impl-bounds, r=nikomatsakis
This should fix both #20020 and #20107. This moves out the code into its own file.

I have a couple concerns that can either be addressed in this PR or in a future one.

- The error reporting for the fulfillment context should be span aware because currently it is attached to the top
  of the file which is less then desirable.
- There is a failure in the test file: run-pass/issue-2611-3.rs, this seems like it should be a failure to me, but I am not sure.

As a nit I'm not enthused about the file name, and am open to better suggestions. 

r? @nikomatsakis
2015-01-15 01:42:25 +00:00
Jorge Aparicio
28b0d4029e use better span 2015-01-14 20:03:17 -05:00
Aidan Hobson Sayers
9002fdbc50 Make link to style guide direct 2015-01-15 00:52:33 +00:00
Aidan Hobson Sayers
e6f7f23a6f Explicitly note that vector contents are on the heap 2015-01-15 00:50:56 +00:00
Flavio Percoco
a7025582cc Don't impl builtin traits on non structs/enums 2015-01-15 01:42:31 +01:00
Jorge Aparicio
86948adfde fix unused import error 2015-01-14 19:22:49 -05:00
Richo Healey
5e646755f4 doc: fix links to servo 2015-01-14 16:13:58 -08:00
Jorge Aparicio
59e9cfa0cf use UFCS in #[deriving(Hash)]
expansion now uses `::std:#️⃣:Hash::hash(&*__self_0_0, __arg_0)` instead of
`(*__self_0_0).hash(__arg_0)`

closes #21160
2015-01-14 18:41:27 -05:00
Jared Roesch
6a66b32270 Refactor compare_impl_method to use all bounds
Refactor compare_impl_method into its own file. Modify the
code to stop comparing individual parameter bounds.
Instead we now use the predicates list attached to the trait
and implementation generics. This ensures consistency even
when bounds are declared in different places (i.e on
a parameter vs. in a where clause).
2015-01-14 13:43:17 -08:00
Niko Matsakis
2479dfcbf7 Revert "rustc_trans: Fix type projection debuginfo" -- it potentially papers over a lack
of normalization that should have taken place.

This reverts commit f7745a9be3.
2015-01-14 16:35:14 -05:00
Niko Matsakis
2868404fca Normalize associated types in the type_is_newtype_immediate pass. Fixes #21010. 2015-01-14 16:35:14 -05:00
Niko Matsakis
ff6085f401 Fix propagation of the HAS_PROJECTION flag in object types. Fixes #20831 some more. 2015-01-14 16:35:14 -05:00
Niko Matsakis
b92ec6a78a Fix Repr output so that it does not ICE when a self-type is
absent. This occurs while printing object type projections for
debugging (note that the `UserString` impl is much more careful about
this).
2015-01-14 16:35:14 -05:00
Niko Matsakis
02aacaba8f Fix DeBruijn accounting. It used to be that all trait-refs were binders,
but now only poly-trait-refs are binders. Fixes #20831.
2015-01-14 16:35:14 -05:00
Adolfo Ochagavía
b23289e961 Remove old obsolete syntax tests 2015-01-14 22:17:04 +01:00
Adolfo Ochagavía
21a2df6362 Remove old obsolete syntax errors 2015-01-14 22:17:03 +01:00
Nick Cameron
6f9e1a0042 Fix interaction of --no-analysis and --emit dep-info
Closes #21130
2015-01-15 09:30:34 +13:00
Nick Cameron
98d471120a Syntax extensions on trait and impl items.
Allows modifiers to be used on methods, associated types, etc.
2015-01-15 08:58:44 +13:00
Brian Anderson
9b10e9ac32 mk: The beta channel produces things called 'beta' 2015-01-14 10:32:42 -08:00
York Xiang
bf899e997e fix wrong link 2015-01-15 01:11:28 +08:00
Simonas Kazlauskas
31261fd629 Disallow a form of invalid asm! macro
Fixes #21045
2015-01-14 17:03:03 +02:00
Toni Cárdenas
428da78de1 TRPL: Anti-example failing for the wrong reason.
Really small correction.

This anti-example in the Closures section is supposed to fail because of a borrow, but it was failing at the type inference because of insufficient type information.

This makes it fail for the expected reason.
2015-01-14 15:24:41 +01:00
nathan dotz
fb55628873 Add examples for DList methods. 2015-01-14 09:17:12 -05:00
bors
896cb36eca auto merge of #21082 : brson/rust/finally, r=alexcrichton
No in-tree users. Ugly interface. Closes #14332.

I just happened to notice that this module still lives and has no users. Assuming we don't want it.

r? @aturon cc @alexcrichton
2015-01-14 12:19:58 +00:00
bors
d52398ef8c auto merge of #21076 : sfackler/rust/bufferedreader-undef, r=Gankro
It's passed to the underlying reader, so uninitialized memory == sad
times.

We might want to shrink the default buffer size as well. 64k is pretty
huge. Java uses 8k by default, and Go uses 4k for reference.

r? @alexcrichton
2015-01-14 09:52:08 +00:00
Nick Cameron
32690b586d Tweek save-analysis treatment of impls 2015-01-14 22:24:09 +13:00
Kevin Yap
5a16ceb291 Improve Rust Documentation & Reference on mobile
- Tables that are too wide for the screen scroll horizontally.
- Inline code that would force the page to become wider than the width
  of the screen is broken in the middle of the word.
2015-01-13 22:39:52 -08:00
Earl St Sauver
2a320f21d0 Fix playpen links to not all be the same
Fixes #20732, that all links in some modules point to the same code
examples was reported. The ID's generated for documents in
librustdoc are not all unique, which means the code rendered as
text is not being properly selected.

This change removes the unique id generation and instead changes the
frontend code to grab the correct code sample by it's relative
position in the dom.
2015-01-13 22:25:11 -08:00
Erick Tryzelaar
e14d053a50 syntax: factor out print_expr arms to reduce non-optimized stack usage 2015-01-13 21:16:56 -08:00
Erick Tryzelaar
caf4a90c66 syntax: Rewrite pp advance_left to use a constant stack size 2015-01-13 21:14:56 -08:00
Erick Tryzelaar
92b48556e0 syntax: Don't import the pp.rs enum variants into the namespace 2015-01-13 21:12:39 -08:00
bors
3614e1de6c auto merge of #21061 : japaric/rust/range, r=nick29581 2015-01-14 04:42:01 +00:00
Richo Healey
78278d0c76 Bump to ensure llvm is rebuilt 2015-01-13 19:03:31 -08:00
Richo Healey
4ab2c47ce6 Clean up conditions for clobbers 2015-01-13 19:01:37 -08:00
Richo Healey
c51379386c Generalise pointer width tests using pointer_width 2015-01-13 18:59:45 -08:00
Steve Klabnik
40219249cf Re-direct to the right place.
Why redirect Tutorial -> Guide -> Book when you can just Tutorial -> Book?

Suggested here: http://www.reddit.com/r/rust/comments/2schav/is_it_possible_to_automatically_redirect/
2015-01-13 21:11:47 -05:00
bors
170c4399e6 auto merge of #21018 : tomjakubowski/rust/rustdoc-where-xcrate, r=alexcrichton
Various fixes for `rustdoc`, including showing where clauses
finally on re-exported items.
2015-01-14 00:41:55 +00:00
Brian Anderson
f0fe4bb114 Address feedback 2015-01-13 15:44:33 -08:00
Florian Hahn
6cfbcca41e Update grammar/verify.rs to work with recent master 2015-01-14 00:20:53 +01:00
Björn Steinbrink
56671cb357 Prefer GEP instructions over weird pointer casting
There are two places left where we used to only know the byte
size of/offset into an array and had to cast to i8 and back to get the
right addresses. But by now, we always know the sizes in terms of the
number of elements in the array. In fact we have to add an extra Mul
instruction so we can use the weird cast-to-u8 code. So we should really
just embrace our new knowledge and use simple GEPs to do the address
calculations.

Additionally, the pointer calculations in bind_subslice_pat don't handle
zero-sized types correctly, producing slices that point outside the
array that is being matched against. Using GEP fixes that as well.

Fixes #3729
2015-01-13 23:47:38 +01:00
Florian Hahn
d397a3e654 Handle question marks in model lexer, closes #15879 2015-01-13 23:31:53 +01:00
bors
c366e433c1 auto merge of #20957 : Ms2ger/rust/closures, r=alexcrichton
Returning the vectors directly makes the code a lot cleaner.
2015-01-13 21:29:00 +00:00
Rohit Joshi
806c13589a Updating email address for Rohit Joshi
When I submitted a PR #20326, mistakenly was committed using my work email. Correct the email address.
2015-01-13 16:28:44 -05:00
Steve Klabnik
ad0ce88c6c Provide example of generic inverse()
Fixes #17224
2015-01-13 15:42:38 -05:00