Simonas Kazlauskas
ea04cdfbe8
Remove two cases of unecesary match branches
2015-04-03 15:48:07 +03:00
Simonas Kazlauskas
d8d59a954f
Address Alex’s comments
2015-04-03 15:48:07 +03:00
Simonas Kazlauskas
8943709221
Update tests to match the messages
2015-04-03 15:48:07 +03:00
Simonas Kazlauskas
f1dabed82b
Introduce trans::declare
...
We provide tools to tell what exact symbols to emit for any fn or static, but
don’t quite check if that won’t cause any issues later on. Some of the issues
include LLVM mangling our names again and our names pointing to wrong locations,
us generating dumb foreign call wrappers, linker errors, extern functions
resolving to different symbols altogether (extern {fn fail();} fail(); in some
cases calling fail1()), etc.
Before the commit we had a function called note_unique_llvm_symbol, so it is
clear somebody was aware of the issue at some point, but the function was barely
used, mostly in irrelevant locations.
Along with working on it I took liberty to start refactoring trans/base into
a few smaller modules. The refactoring is incomplete and I hope I will find some
motivation to carry on with it.
This is possibly a [breaking-change] because it makes dumbly written code
properly invalid.
2015-04-03 15:48:07 +03:00
Simonas Kazlauskas
caea044929
Move a big attribute fn into trans::attributes
2015-04-03 15:48:07 +03:00
Simonas Kazlauskas
deb097a1d2
Implement LLVMGetOrInsertGlobal wrapper
2015-04-03 15:48:07 +03:00
Simonas Kazlauskas
cb4570311b
Move get_extern_fn and get_res_dtor out of base
...
These functions have only a single use and functionally belong to foreign and glue respectively
anyway
2015-04-03 15:48:04 +03:00
Simonas Kazlauskas
c71970eea2
Extract attribute handling code into a module
...
This commit causes no change in trans semantics, it just moves some functions around and
deduplicates them.
2015-04-03 15:46:09 +03:00
Simonas Kazlauskas
d36c4db96d
Add the tests for duplicate symbol errors
2015-04-03 15:46:09 +03:00
Simonas Kazlauskas
baa52caf83
Abort creating wrapper fn for multiple inner fns
...
This discovers another class of mis-trans where we wrap multiple native functions into a single
wrapper, which is wrong.
2015-04-03 15:46:09 +03:00
Simonas Kazlauskas
2198969f89
Wrap LLVM’s Module::getNamedValue
2015-04-03 15:46:09 +03:00
Simonas Kazlauskas
723ca4bd4d
Validate export_name attribute
2015-04-03 15:46:03 +03:00
Simonas Kazlauskas
b9a11f0f85
Fix a broken test
...
It emits the same symbol – `transmute` – from the same crate twice.
2015-04-03 15:37:51 +03:00
Nick Cameron
dc8a8e9beb
Check uses of Self
in impls in the compiler rather than during expansion
...
Closes #23909
2015-04-03 22:47:53 +13:00
bors
82dcec7ee4
Auto merge of #23934 - lfairy:write-no-deref, r=alexcrichton
...
This means passing in e.g. a `Vec<u8>` or `String` will work as
intended, rather than deref-ing to `&mut [u8]` or `&mut str`.
[breaking-change]
Closes #23768
2015-04-03 07:13:51 +00:00
Corey Farwell
b406782e29
Indicate associated type in comment is code-like
2015-04-02 22:47:50 -07:00
Aaron Turon
6529872afc
Adjust AsRef
impl for Cow
...
The existing impl had the too-strong requirement of `Clone`, when only
`ToOwned` was needed.
2015-04-02 22:22:44 -07:00
Aaron Turon
ad3daa89f2
Update AUTHORS.txt as of 1.0.0-beta
2015-04-02 21:52:34 -07:00
bors
fc98b19cf7
Auto merge of #23832 - petrochenkov:usize, r=aturon
...
These constants are small and can fit even in `u8`, but semantically they have type `usize` because they denote sizes and are almost always used in `usize` context. The change of their type to `u32` during the integer audit led only to the large amount of `as usize` noise (see the second commit, which removes this noise).
This is a minor [breaking-change] to an unstable interface.
r? @aturon
2015-04-03 04:29:52 +00:00
Vadim Petrochenkov
e1be69b8a9
Add tests for parsing of patterns
2015-04-03 05:56:27 +03:00
bors
5e30f05a05
Auto merge of #23974 - pnkfelix:fix-23973, r=alexcrichton
...
Do not suggest `#![feature(...)]` if we are in beta or stable channel.
Fix #23973
2015-04-03 01:44:00 +00:00
Liam Monahan
06bc99918c
doc/trpl: Fixing a comma splice in iterators.md.
2015-04-02 20:02:57 -04:00
bors
d17d6e7f1f
Auto merge of #23967 - semarie:libc-clone, r=alexcrichton
...
affected struct:
- sockaddr_storage
- sockaddr_un
apply the same method used for linux for:
- bitrig/openbsd
- freebsd
- dragonfly
this commit unbreak build for openbsd (and bitrig, freebsd and dragonfly too I think)
r? @alexcrichton
2015-04-02 22:56:28 +00:00
Richo Healey
5a700b26e8
liballoc: fix typo
2015-04-02 15:08:10 -07:00
Piotr Szotkowski
d97325c9b8
Book: sync ‘Crates and Modules’ with current output
2015-04-02 23:18:47 +02:00
Kevin Butler
8b719eefc0
std: impl From<String> for Box<Error + Send>
2015-04-02 21:10:25 +01:00
Brian Anderson
1cbaf9fd18
Upgrade rust-installer
2015-04-02 11:31:31 -07:00
bors
d1835ae7cc
Auto merge of #23931 - steveklabnik:doc_std_fs, r=alexcrichton
2015-04-02 18:17:48 +00:00
Felix S. Klock II
f6a06808ec
Fallout to tests expecting unconditional help output from missing features.
2015-04-02 19:30:45 +02:00
Niko Matsakis
c2dba8580a
Merge conflicts
2015-04-02 13:25:06 -04:00
Niko Matsakis
38fdd50e0b
Remove *most* mentions of phantom fns and variance on traits. Leave some
...
comments and also leave the entries in the variance tables for now.
2015-04-02 13:25:06 -04:00
Niko Matsakis
628d715ff4
Deprecate MarkerTrait and PhantomFn.
2015-04-02 13:25:06 -04:00
Niko Matsakis
9b5accade7
Fallout in tests
2015-04-02 13:24:46 -04:00
Niko Matsakis
dd31bb24e8
Modify variance inference to always infer all trait parameters as invariant.
2015-04-02 13:24:46 -04:00
Gleb Kozyrev
52340630a6
Implement PartialEq<str> for String and Cow
2015-04-02 18:53:04 +03:00
Gleb Kozyrev
63c01cea2d
Change PartialEq impls in collections::string to slice notation
2015-04-02 18:52:53 +03:00
Felix S. Klock II
9b8957f1d4
Revise logic to match rustc::session::config::get_unstable_features_setting
2015-04-02 17:47:51 +02:00
bors
edac3ce6fb
Auto merge of #23877 - richo:gardening, r=Manishearth
...
I also wanted to unignore https://github.com/rust-lang/rust/blob/master/src/libsyntax/ext/expand.rs#L1768-L1777 since the issue it references is closed, but the test fails, and it's internals aren't super clear to me.
2015-04-02 15:33:22 +00:00
Felix S. Klock II
eaea188d96
Do not suggest #![feature(...)]
if we are in beta or stable channel.
...
Fix #23973
2015-04-02 17:29:22 +02:00
Steve Klabnik
187355178b
Add more examples and documentation for std::fs
2015-04-02 11:12:59 -04:00
bors
9854143cba
Auto merge of #23868 - mbrubeck:doc-edit, r=Manishearth
...
r? @steveklabnik
2015-04-02 12:47:19 +00:00
Sébastien Marie
26453bb60d
unary negation of unsigned integers
...
unbreak build for:
- linux (mips/mipsel)
- freebsd
- dragonfly
- bitrig
- openbsd
by converting unsigned integers `-1` to `!0`
2015-04-02 14:23:41 +02:00
Vadim Petrochenkov
76567a64c1
Fix parsing of patterns in macros
2015-04-02 15:09:43 +03:00
Sébastien Marie
48b3def76c
don't derive Clone, but impl it
...
affected struct:
- sockaddr_storage
- sockaddr_un
apply the same method used for linux for:
- bitrig/openbsd
- freebsd
- dragonfly
2015-04-02 13:34:40 +02:00
Vadim Petrochenkov
35c1bdb2b4
syntax: Rewrite parsing of patterns
2015-04-02 13:34:26 +03:00
bors
3e8a773bc5
Auto merge of #23822 - tanadeau:remove-box-syntax-in-pointers-doc, r=steveklabnik
...
This is the first use of `box`. It's an unstable feature and also isn't
consistent with the use of `Box` in the "original" code above it.
r? @steveklabnik
2015-04-02 10:02:30 +00:00
bors
cf00fc4da9
Auto merge of #23963 - alexcrichton:rollup, r=alexcrichton
2015-04-02 07:19:33 +00:00
Alex Crichton
e3b7e6caa2
Tweak relese notes + rebase fixes
2015-04-02 00:18:45 -07:00
Trent Nadeau
00d929dcb3
Moved use of box_syntax
unstable feature in docs to Unstable section.
...
Create a new section under the Unstable section for `box` syntax and
patterns and removed their discussion from the Pointers section.
2015-04-01 21:53:37 -04:00
Alex Crichton
fb77443213
rollup merge of #23959 : aturon/beta-relnotes
...
Collected from TWiR and the PR log.
r? @alexcrichton
f? @brson @nikomatsakis @huonw
2015-04-01 18:43:49 -07:00