-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from dimpolo/no_std_compat
Where possible replace ::std with ::core in codegen
- Loading branch information
Showing
2 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#![no_std] | ||
#![allow(dead_code)] | ||
|
||
use auto_impl::auto_impl; | ||
|
||
mod core {} | ||
|
||
mod alloc {} | ||
|
||
struct Box; | ||
struct Rc; | ||
struct Arc; | ||
struct Fn; | ||
struct FnMut; | ||
|
||
#[auto_impl(&, &mut, Box, Rc, Arc)] | ||
trait Test {} | ||
|
||
#[auto_impl(Fn)] | ||
trait TestFn { | ||
fn test(&self); | ||
} | ||
|
||
#[auto_impl(FnMut)] | ||
trait TestFnMut { | ||
fn test(&mut self); | ||
} |