From e8ad478f6fb33bb95fd7cc215323e0f2a4d7c778 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Wed, 3 Jul 2019 23:53:35 +0200 Subject: [PATCH] Remove traits from README --- library/compiler-builtins/libm/README.md | 17 +---------------- library/compiler-builtins/libm/src/lib.rs | 10 ---------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/library/compiler-builtins/libm/README.md b/library/compiler-builtins/libm/README.md index 8b93f260373d..e10904f8cf08 100644 --- a/library/compiler-builtins/libm/README.md +++ b/library/compiler-builtins/libm/README.md @@ -18,22 +18,7 @@ term goal is to enable [math support in the `core` crate][core]. ## Already usable -This crate is [on crates.io] and can be used today in stable `#![no_std]` programs like this: - -[on crates.io]: https://crates.io/crates/libm - -``` rust -#![no_std] - -extern crate libm; - -use libm::F32Ext; // adds methods to `f32` - -fn foo(x: f32) { - let y = x.sqrt(); - let z = libm::truncf(x); -} -``` +This crate is [on crates.io] and can be used today in stable `#![no_std]` programs. The API documentation can be found [here](https://docs.rs/libm). diff --git a/library/compiler-builtins/libm/src/lib.rs b/library/compiler-builtins/libm/src/lib.rs index b37248ffba43..b15857dbe6f6 100644 --- a/library/compiler-builtins/libm/src/lib.rs +++ b/library/compiler-builtins/libm/src/lib.rs @@ -1,14 +1,4 @@ //! libm in pure Rust -//! -//! # Usage -//! -//! You can use this crate in two ways: -//! -//! - By directly using its free functions, e.g. `libm::powf`. -//! -//! - By importing the `F32Ext` and / or `F64Ext` extension traits to add methods like `powf` to the -//! `f32` and `f64` types. Then you'll be able to invoke math functions as methods, e.g. `x.sqrt()`. - #![deny(warnings)] #![no_std] #![cfg_attr(