Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rust “不稳定库功能”的解决方法是什么;核心;问题_Rust_Biginteger - Fatal编程技术网

Rust “不稳定库功能”的解决方法是什么;核心;问题

Rust “不稳定库功能”的解决方法是什么;核心;问题,rust,biginteger,Rust,Biginteger,我试图在Rust中将大整数相加: extern crate core; use core::ops::Add; use num::bigint::{BigInt}; use num::integer::Integer; ... let mut big = "8705702225074732811211966512111".parse::<BigInt>().unwrap(); let one = "1".parse::<BigInt>().unwrap(); big =

我试图在Rust中将大整数相加:

extern crate core;
use core::ops::Add;
use num::bigint::{BigInt};
use num::integer::Integer;
...
let mut big = "8705702225074732811211966512111".parse::<BigInt>().unwrap();
let one = "1".parse::<BigInt>().unwrap();
big = big.add(&one);

现在有什么解决办法吗?或者这在目前是完全不可行的?

您应该能够使用trait而不是
core::ops::Add

use std::ops::Add;

谢谢成功了。尽管很奇怪。。。有没有一种方法可以仅仅根据文档而不是在论坛上提问来找出这个答案呢?他们说
不建议使用核心库。libcore的稳定功能是从标准库中重新导出的。
,并提供指向文档的链接。
use std::ops::Add;