0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-30 10:26:11 +01:00
Commit Graph

5864 Commits

Author SHA1 Message Date
Brian Anderson
dcee98b024 Un-xfail-fast some tests
check-fast is more reliable now.
2011-10-20 16:01:24 -07:00
Brian Anderson
28161fcf3c Change run-pass/lots-a-fail.rs from xfail-fast to xfail-win32
All failing tasks leak on windows now
2011-10-20 16:00:13 -07:00
Brian Anderson
0714bb5f7d Fix the problem with check-fast randomly failing
Trans has been assuming that tag node id's are unique across crates and they
are not so, depending on which way the wind is blowing, it would choose to use
a crate-local tag variant instead of the correct one from std.

No test case since I can't come up with a reliable one that compiles in a
reasonable amount of time.
2011-10-20 15:38:51 -07:00
Marijn Haverbeke
f8f1d950ef Register new snapshots 2011-10-20 17:36:29 +02:00
Marijn Haverbeke
ba1c6fcf38 Remove the last vestiges of main.ll
Closes #992
2011-10-20 17:36:28 +02:00
Marijn Haverbeke
ef63f09dcd Don't rely on main.ll anymore
I'll remove the actual file after I register a snapshot.

Issue #992
2011-10-20 17:18:38 +02:00
Marijn Haverbeke
cff9c67674 Output linker errors, when linking fails 2011-10-20 15:30:27 +02:00
Marijn Haverbeke
8124846b2c Get rid of taskpointer-passing throughout the compiler
Only intrinsics still take a dummy taskptr. We'll have to do some
makefile stunts to snapshot a version without taskptrs-in-intrinsics.

Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
457683c7fe Do not pass taskpointers to "rust" native functions
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
6323a012bd Remove taskptr argument from upcalls
Issue #466
2011-10-20 13:15:21 +02:00
Marijn Haverbeke
e927df17f7 Remove spawn_wrap and main_wrap kludges
This isn't needed now that our functions are cdecl (and was apparently
only still working by accident).

Issue #992
2011-10-20 13:15:09 +02:00
Marijn Haverbeke
243c5c3479 Use snap runtime, and the old main.o, for stage1
This is intended to be reverted again after I register the next
snapshot.
2011-10-20 13:14:28 +02:00
Brian Anderson
880b1ec9f5 Fail nicer when the parser doesn't find an expected string literal
Closes #1028
2011-10-19 18:04:44 -07:00
Matt Brubeck
15d33f7957 Fix parse error in constrained-type-missing-check.rs 2011-10-18 16:42:00 -07:00
Brian Anderson
f70a894855 Register snapshots 2011-10-18 12:08:15 -07:00
Brian Anderson
ac276f7016 Introduce fn@ as a synonym for fn 2011-10-18 11:14:02 -07:00
Niko Matsakis
86735c0d7d make ctags targets phony 2011-10-18 10:37:27 -07:00
Brian Anderson
314c011d71 Immutable and mutable? are covariant on their inner types
Whereas [mutable T] is invariant with respect to T, [T] and [mutable? T]
are covariant with respect to T.
2011-10-18 10:37:04 -07:00
Marijn Haverbeke
71a4a66135 Add a math module to the standard lib
I need some rudimentary stdlib stuff for the tutorial.

Closes #1042
2011-10-18 13:54:35 +02:00
Marijn Haverbeke
d9d0782b5f Don't try to build an LLVM switch on floats
Closes #1046
2011-10-18 13:54:35 +02:00
Marijn Haverbeke
3cabe7429f Add a print and println to std::io 2011-10-18 13:06:47 +02:00
Matt Brubeck
5950ae3c0e doc: Fix parse errors in list examples in documentation 2011-10-17 22:50:46 -07:00
Matt Brubeck
f400bfd8fd doc: Update 'alt' documentation to remove 'case' keyword 2011-10-17 22:50:46 -07:00
Matt Brubeck
1e5f163eec doc: 'alt' expressions no longer require parens 2011-10-17 22:21:31 -07:00
Matt Brubeck
9e8076c88b doc: 'if' expressions no longer require parens 2011-10-17 22:21:31 -07:00
Matt Brubeck
db84029268 doc: 'for' and 'for each' no longer use parens 2011-10-17 22:21:31 -07:00
Matt Brubeck
16a5885555 doc: Fix typo (s/pay/may/) 2011-10-17 22:21:31 -07:00
Brian Anderson
0f0fa26c72 Enforce variance rules for mutable types 2011-10-17 20:51:34 -07:00
Brian Anderson
48d351b21e Add a variance transform for calculation of recursive variance 2011-10-17 19:37:34 -07:00
Brian Anderson
d6613384fd Introduce covariance, contravariance and invariance to the type unifier
This will be used to resolve some problems with mutable? covariance and also
to implement function subtyping
2011-10-17 19:34:12 -07:00
Brian Anderson
b61578e1cd Don't unify from mutable? to immutable
Immutable is supposed to be a subtype of mutable-huh.
2011-10-17 16:36:49 -07:00
Brian Anderson
f7a825c614 Split record_var_binding into methods for expected and actual
This allows unify to maintain the same subtype relationship between
expected and actual throughout unify, which we are going to need
for mutable? and for function types.
2011-10-17 16:36:49 -07:00
Brian Anderson
1a64153b24 Correct two more analyses of mutable? as mutable
I can't come up with test cases but this seems correct.
2011-10-17 16:35:33 -07:00
Brian Anderson
4d9d889dbf Don't allow assignment to mutable-wha? 2011-10-17 16:35:33 -07:00
David Rajchenbach-Teller
454333368c [Lib] int.rs, uint.rs: added max_value, min_value 2011-10-17 11:22:57 -07:00
David Rajchenbach-Teller
064f9dd93e [Lib] uint.rs: +min_value 2011-10-17 11:22:57 -07:00
David Rajchenbach-Teller
a85e035038 [Lib] rand.rs: type rng now defines next_float 2011-10-17 11:22:57 -07:00
David Rajchenbach-Teller
eba88ef3ea [Lib] u32.rs: created 2011-10-17 11:22:57 -07:00
David Rajchenbach-Teller
27ca86a853 [Lib] u8.rs, u64.rs: +min_value, max_value 2011-10-17 11:22:57 -07:00
Brian Anderson
007422cc04 Change the linkage order on linux and add -ldl
-lrt and -ldl need to be specified after -lrustrt since they are only used by
rustrt.
2011-10-17 10:41:22 -07:00
Brian Anderson
b42e551285 Only link librt on linux 2011-10-16 02:36:42 -07:00
Haitao Li
ad5014bf4c Fix link error by explicitly link needed DSOs
Building Rust(version 280bc56) on Ubuntu 11.10 failed with link error,
like:

compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/lib/libstd.so
compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/bin/rustc
/local/src/rust/build/stage0/lib/rustc/i686-unknown-linux-gnu/lib/librustrt.so:
undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
error: linking with gcc failed with code 1

GCC toolchain released by Ubuntu 11.10 introduced a few compiler flags
that are different with upstream GCC[1]. Flags "-Wl,--as-needed' and
'-Wl,--no-copy-dt-needed-entries' are passed by default.

Function clock_gettime from librt is used by librustrt, indirectly by
rustc. It is necessary to explicitly pass the "-lrt" flags when building
rustc.

Please note since the toolchain changes will be the default in the next
release(2.22) of binutils, this is not actually a Debian/Ubuntu specific
issue.

1. https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes#GCC_4.6_Toolchain

Signed-off-by: Haitao Li <lihaitao@gmail.com>
2011-10-16 17:12:30 +08:00
Brian Anderson
280bc5633d Add Elly Jones to AUTHORS.txt 2011-10-15 15:53:18 -07:00
Elly Jones
a5dc6a7aa8 Update LinkModules invocation to use new prototype
LLVM revision 141606 changes the prototype of llvm::Linker::LinkModules.

Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-10-15 15:53:18 -07:00
Brian Anderson
d77996a30f Add LLVM 3.1svn to supported versions 2011-10-15 15:53:18 -07:00
Marijn Haverbeke
0a01144797 Use trans_expr_save_in instead of trans_expr when appropriate
This guards against passing a save_in destination to nil or bot-typed things.
2011-10-14 11:27:16 +02:00
Marijn Haverbeke
06257d66e7 Don't crash when reporting an unresolved import in the nil scope
Closes #1027
2011-10-14 11:25:14 +02:00
Brian Anderson
3808a498cd Remove an unnecessary visitor from rustc::middle::fn_usage 2011-10-13 14:55:50 -07:00
Brian Anderson
acf9b83e71 Fix a use of visit in rustc::middle::fn_usage
This was working by just skipping an AST node instead of doing the advertised
check. I can't find a test case for it, but this is more correct.
2011-10-13 14:55:47 -07:00
Brian Anderson
bc4c3df1bf Don't allow the value of generic bare functions to be taken
Issue #1038
2011-10-13 14:39:30 -07:00