You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following file. If the line 131 is set at line 152, so just above this line:
letmut s = rgsl::MultiFitFdfSolver::new(&T, n asu64, p asu64).unwrap();
I get the following error:
examples/multifit_solver/main.rs:152:47: 152:48 error: `T` does not live long enough
examples/multifit_solver/main.rs:152 let mut s = rgsl::MultiFitFdfSolver::new(&T, n as u64, p as u64).unwrap();
^
examples/multifit_solver/main.rs:138:6: 191:2 note: reference must be valid for the block suffix following statement 10 at 138:5...
examples/multifit_solver/main.rs:138 };
examples/multifit_solver/main.rs:139
examples/multifit_solver/main.rs:140 /* This is the data to be fitted */
examples/multifit_solver/main.rs:141 let mut iter = 0us;
examples/multifit_solver/main.rs:142
examples/multifit_solver/main.rs:143 foriin range(0, n) {
...
examples/multifit_solver/main.rs:151:50: 191:2 note: ...but borrowed value is only valid for the block suffix following statement 13 at 151:49
examples/multifit_solver/main.rs:151 let T = rgsl::MultiFitFdfSolverType::lmsder();
examples/multifit_solver/main.rs:152 let mut s = rgsl::MultiFitFdfSolver::new(&T, n as u64, p as u64).unwrap();
examples/multifit_solver/main.rs:153
examples/multifit_solver/main.rs:154 s.set(&mut f, &x.vector());
examples/multifit_solver/main.rs:155
examples/multifit_solver/main.rs:156 print_state(iter as u64, &mut s);
...
error: aborting due to previous error
Is that normal? The variable does live long enough so I don't get why there is an error in here.
The text was updated successfully, but these errors were encountered:
Hi,
I have the following file. If the line 131 is set at line 152, so just above this line:
I get the following error:
Is that normal? The variable does live long enough so I don't get why there is an error in here.
The text was updated successfully, but these errors were encountered: