Commit Graph

31 Commits

Author SHA1 Message Date
schaeff
1dbd5ae6cc allow deprecated to remove warning in nightly 2019-07-09 10:29:27 +02:00
Bruno Zimmermann
a047873634 using the stable spin's once implementation 2018-10-31 14:13:53 -03:00
Adam Perry
28cc0701ba Automatically use the allocation-free API for Rust 1.27.0+.
1.27.0 stabilized hint::unreachable, allowing the previously
nightly-only API to be used on stable.

The version detection can still be overridden using `cfg`s
(or their related environment variables through cargo), and both
the nightly and spin_no_std features are preserved for compatibility.
2018-07-08 13:55:15 -07:00
Ashley Mannix
afa05d22a5 fix up compile tests 2018-05-29 08:19:51 +10:00
Marvin Löbel
8fff063b97 Fix error pattern 2017-11-13 19:14:51 +01:00
Marvin Löbel
e1f9b539c3 Check that statics are sized. Closes #26 2017-11-13 18:02:03 +01:00
Łukasz Neumann
b861665f72 Improved support for visibility restrictions 2017-11-12 17:18:29 +01:00
Łukasz Neumann
e5b681587f Added notes on compile tests 2017-11-12 03:01:17 +01:00
Łukasz Neumann
36fe6b39db Added support for compiler tests 2017-11-12 02:45:30 +01:00
Marvin Löbel
be193a06f5 Fixed lifetime variable scoping bug 2017-04-02 01:53:29 +02:00
Marvin Löbel
38a2fdb0f9 Fixed bug and written test for initialize() 2017-03-04 14:55:48 +01:00
Marvin Löbel
ca98194537 Added some old uncommited test case 2016-11-11 16:37:08 +01:00
John Ericson
b230b7a945 Rename no_std feature to spin_no_std, since it changes algorithm 2016-04-24 15:03:55 -07:00
John Ericson
ecf1de08c1 Don't need the core_intrinsics feature in so many places 2016-04-20 14:24:11 -07:00
John Ericson
5c70ffba0c Fix macro, harden by always using #![no_std], add test 2016-04-20 14:22:03 -07:00
Marvin Löbel
20e00c51c6 Add a visibility test 2015-10-02 19:20:38 +02:00
Simon Sapin
b6c92bccb7 Enable #![feature(core_intrinsics)] on nightly in tests 2015-08-04 14:10:49 +02:00
Marvin Löbel
a15ddc1117 Made macro not use a heap allocation on nightly 2015-08-04 00:08:31 +02:00
Alex Burka
3a47450180 support metadata on statics 2015-07-21 10:33:39 +02:00
Marvin Löbel
67e2c360a4 Made macro more hygenic by re-arranging items inside the expansion to not be
visible inside the user-provided code.
2015-04-06 15:34:52 +02:00
Jesse A. Tov
3250eea65d Moved user initialization code out of the unsafe block.
The user-provided initialization expression was being evaluated in an
unsafe block, because it appeared as the argument of transmute. This
meant that 1) the user code could do unsafe operations without it being
marked by an unsafe block, and 2) writing an unsafe block in the user
code produced a warning. Now the user code is spliced into an inline
function defined above the unsafe block, and the function is called
inside the unsafe block.
2015-04-05 13:26:37 -04:00
Jesse A. Tov
b8b143166a Updated tests to work with nightly 1.0.0-beta (9854143cb 2015-04-02) 2015-04-05 13:08:40 -04:00
Drew Crawford
a904c51132 This line appears unnecessary. It was emitting the following warning:
tests/test.rs:1:10: 1:18 warning: unknown `allow` attribute: `unstable`, #[warn(unknown_lints)] on by default
    tests/test.rs:1 #![allow(unstable)]
2015-03-06 20:50:13 -06:00
Drew Crawford
cafdef58b9 Move to new slice syntax
This fixes some warnings.
2015-03-06 20:49:26 -06:00
Marvin Löbel
61a2858872 Disabled warning about a missing Copy implementantion from the generated
types.

Seeing how the type just exists for the generated static, making it
copyable does not seem to have any benefits.
2015-01-16 16:49:59 +01:00
Marvin Löbel
1584ea62b0 Fix alpha breakage 2015-01-10 17:29:18 +01:00
Nicholas Hollett
4f25859398 Update for rust nightly (2015-01-06)
sync::Once::doit() -> call_once()
phase/plugin is now just #[macro_use]
Added comment to tests to remind self that UNUSED should trigger dead
code warnings, because it's not clear where the dead code warnings come
from when running tests.
2015-01-08 11:34:42 +00:00
Ken Tossell
8d617be614 Updated for latest Rust nightly.
Deref is no longer in the prelude, so it had to be specified using its full
path (thanks to @pczarn for the syntax). Deref's type paramter was replaced
with an associated type, Target.

Replaced [Box<uint>, ..3] with [Box<uint>; 3] because the former syntax is gone.
2015-01-03 18:12:32 -05:00
Marvin Löbel
76f06e4fa7 Fix tests 2014-11-22 19:36:57 +01:00
Marvin Löbel
e62a65372f Added support for public lazy statics
Updated travis config
2014-09-03 15:19:06 +02:00
Marvin Löbel
6d724cc9f1 Fix warning; Made test external 2014-08-07 16:42:49 +02:00