Niko Matsakis
30e8ab0182
Encode the name for associated items on a trait. Fixes #18048 .
2014-12-30 09:36:23 -05:00
Niko Matsakis
c1bc150bc4
Correct licenses.
2014-12-30 09:36:23 -05:00
Niko Matsakis
7ed0e23209
Resolve merge conflicts. This changes should really be integrated back to their respective
...
commits but oh dear what a pain.
2014-12-30 09:36:23 -05:00
Niko Matsakis
05eb2eeb61
Adjust tests for inferenceGet more conservative about inference for now. Seems better to err on the side of being more correct rather than less. Fix a bug in typing index expressions that was exposed as a result, and add one type annotation that is not required. Delete some random tests that were relying on old behavior and don't seem to add anything anymore.
2014-12-30 09:36:23 -05:00
Niko Matsakis
c197911c60
Add a FIXME relating to these type-testing traits
2014-12-30 09:36:23 -05:00
Niko Matsakis
f1c041a54d
Patch long line.
2014-12-30 09:36:23 -05:00
Niko Matsakis
00cf176a5e
Add FIXMEs relating to caching of projection results
2014-12-30 09:36:22 -05:00
Niko Matsakis
97d8a668f6
Add a FIXME relating to regions and projection types
2014-12-30 09:36:22 -05:00
Niko Matsakis
d62d4953d2
Add a FIXME to patch up rustdoc
2014-12-30 09:36:22 -05:00
Niko Matsakis
58467fab0f
File a FIXME relating to using where clauses, not bounds
2014-12-30 09:36:22 -05:00
Niko Matsakis
df967306e3
Add a FIXME relating to Copy<T> not being checked
2014-12-30 09:36:22 -05:00
Niko Matsakis
adca15a151
Add a FIXME relating to using ast::Name
2014-12-30 09:36:22 -05:00
Niko Matsakis
7836c72eba
Patch tests and create new tests related to projection from a HRTB.
2014-12-30 09:36:22 -05:00
Niko Matsakis
3657ae13f5
Don't normalize associated types when in region binders, wait until we instantiate
...
them. Also fix some assertions and handling of builtin bounds.
2014-12-30 09:36:22 -05:00
Niko Matsakis
2bbd2f9cea
Remove the def-id from type parameters. Having this def-id was bad for several reasons:
...
1. Produced more unique types than is necessary. This increases memory consumption.
2. Linking the type parameter to its definition *seems* like a good idea, but it
encourages reliance on the bounds listing.
3. It made pretty-printing harder and in particular was causing bad error messages
when errors occurred before the `TypeParameterDef` entries were fully stored.
2014-12-30 09:36:22 -05:00
Niko Matsakis
964a5fabb7
Update error messages in various compile-fail tests
2014-12-30 09:36:22 -05:00
Niko Matsakis
b7c6e317b0
Make projected types select out of the trait bounds.
2014-12-30 09:36:22 -05:00
Niko Matsakis
de806bc057
Teach project
to project associated types out of object types.
2014-12-30 09:36:22 -05:00
Niko Matsakis
5b53b11ad9
Allow object safe traits to access associated types.
2014-12-30 09:36:21 -05:00
Niko Matsakis
becbd81aaa
Integrate projection bounds to ExistentialBounds
but do not use them for anything.
2014-12-30 09:36:21 -05:00
Niko Matsakis
82787c2252
Convert to use Rc<TraitRef>
in object types (finally!).
2014-12-30 09:36:21 -05:00
Niko Matsakis
4404592f36
Implement associated type projection and normalization.
2014-12-30 09:36:21 -05:00
Niko Matsakis
f95bb55a1c
Move the scalar types out of static data so that we can put Rc
into sty.
2014-12-30 09:34:38 -05:00
Niko Matsakis
771dd54ea6
Rename Polytype
to TypeScheme
to differentiate type schemes (early bound) from higher-ranked things (late-bound), which also use the Poly
prefix.
2014-12-30 09:32:42 -05:00
Niko Matsakis
986f654f3b
Rename trait_ref
field to predicate
, since trait_ref
is really
...
overly general, and the value is always *some* sort of predicate.
2014-12-30 09:32:42 -05:00
Niko Matsakis
c5edd22646
Rewrite the intrinsicck to take the parameter environment into account. Also fixes #20116 .
2014-12-30 09:32:42 -05:00
Niko Matsakis
4946e1a463
Move the TypeContents-based "Sized" queries into trans, where the full
...
types are always known and hence the ParameterEnvironment is not
necessary. For other `Sized` queries, use the trait infrastructure
just like `Copy`.
2014-12-30 09:32:42 -05:00
Niko Matsakis
0b64e5796b
Make ExprUseVisitor<..> use inherited parameter environments.
2014-12-30 09:32:42 -05:00
Niko Matsakis
c08d004545
Refactor various queries out of ty
and into trans/common
2014-12-30 09:32:42 -05:00
JONNALAGADDA Srinivas
42ae6bb24d
Minor change to wording in Variables and Bindings
...
In the context of explaining the declaration of mutable bindings, using 'intended' probably conveys the meaning better than 'cared'.
2014-12-30 19:23:16 +05:30
Florian Hahn
b41a24f314
Handle function calls to integers in model lexer correctly
...
closes #15877
2014-12-30 14:03:48 +01:00
Valerii Hiora
c3ff80399b
iOS: fallout of Sync oibit
2014-12-30 14:57:03 +02:00
bors
023dfb0c89
auto merge of #19941 : alexcrichton/rust/issue-19767, r=brson
...
This commit adds support for the compiler to distinguish between different forms
of lookup paths in the compiler itself. Issue #19767 has some background on this
topic, as well as some sample bugs which can occur if these lookup paths are not
separated.
This commits extends the existing command line flag `-L` with the same trailing
syntax as the `-l` flag. Each argument to `-L` can now have a trailing `:all`,
`:native`, `:crate`, or `:dependency`. This suffix indicates what form of lookup
path the compiler should add the argument to. The `dependency` lookup path is
used when looking up crate dependencies, the `crate` lookup path is used when
looking for immediate dependencies (`extern crate` statements), and the `native`
lookup path is used for probing for native libraries to insert into rlibs. Paths
with `all` are used for all of these purposes (the default).
The default compiler lookup path (the rustlib libdir) is by default added to all
of these paths. Additionally, the `RUST_PATH` lookup path is added to all of
these paths.
Closes #19767
2014-12-30 11:11:07 +00:00
Huon Wilson
b7832ed0b4
Implement Clone
for a large number of iterators & other adaptors.
...
It's useful to be able to save state.
2014-12-30 21:01:36 +11:00
Rohit Joshi
8fb25ab5b0
PR#20326 : Issue#20322: Adding unsafe Send and Sync traits implementation for RingBuf
2014-12-30 04:20:24 -05:00
bors
d2368c3c11
auto merge of #20320 : alexcrichton/rust/rollup, r=alexcrichton
2014-12-30 08:02:39 +00:00
Alex Crichton
470ae101d6
Test fixes and rebase conflicts
2014-12-29 23:55:49 -08:00
Luqman Aden
82ebd2bc20
librustc_trans: Remove some dead code now that procs are gone.
2014-12-30 01:45:22 -05:00
Nick Cameron
69716ef607
Tests
2014-12-30 19:06:18 +13:00
Nick Cameron
cd31e6ff39
Forbid static methods in object safe traits
...
Closes #19949 and rust-lang/rfcs#428
[breaking change]
If you have traits used with objects with static methods, you'll need to move
the static methods to a different trait.
2014-12-30 19:05:48 +13:00
Brian Anderson
f253002e34
mk: The beta channel temporarily produced alpha versions
2014-12-29 20:19:02 -08:00
Brian Anderson
56c26ab663
mk: Allow an optional number to come after the beta version label
2014-12-29 20:17:47 -08:00
Alex Crichton
cb7599b83e
rollup merge of #20317 : brson/rust-installer-v2
2014-12-29 19:47:58 -08:00
Eric Allen
011b5ca1bd
Fix impl of Send and Sync for mips
...
In f436f9ca2
, the Send and Sync traits became `unsafe`. They were updated for `target_arch = x86` and others, but `mips` was missed.
2014-12-29 22:16:53 -05:00
Brian Anderson
b12dfbb491
Simplify some logic in dist.mk
2014-12-29 19:08:35 -08:00
P1start
5cf72ff898
Parse arbitrary operators after expr-like macro invocations in statement position
...
Closes #20093 .
2014-12-30 16:06:48 +13:00
Brian Anderson
7628806997
mk: Package mingw components in unix installer on windows
...
This puts stdc++ and the unwinding dll into the main package
and creates a separate rust-mingw package for everything else.
2014-12-29 17:26:05 -08:00
Brian Anderson
022d48566b
mk: Make distcheck build binary tarballs on windows
...
These work, but aren't being built and uploaded because the bots run
'distcheck' not 'dist'.
2014-12-29 17:26:05 -08:00
Brian Anderson
8b3c67690c
Install copyright information and package docs
...
This distributes docs in a separate package called rust-docs. The rust-packaging
project will combine it with Rust and Cargo into a single installer in a variety of formats.
2014-12-29 17:26:05 -08:00
Brian Anderson
4f2ab2bf46
Upgrade rust-installer to v2
2014-12-29 17:26:02 -08:00