Comments (1)
Note that the change from roff
0.1 to 0.2 is a significant overhaul.
just trying to build against roff
0.2.1, i see these errors:
Compiling roff v0.2.1
Compiling man v0.3.0 (/home/dkg/src/rust/man)
error[E0432]: unresolved imports `roff::list`, `roff::Troffable`
--> src/man.rs:2:26
|
2 | use roff::{bold, italic, list, Roff, Troffable};
| ^^^^ ^^^^^^^^^ no `Troffable` in the root
| |
| no `list` in the root
error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> src/man.rs:95:20
|
95 | let mut page = Roff::new(&self.name, man_num);
| ^^^^^^^^^ ---------- ------- supplied 2 arguments
| |
| expected 0 arguments
|
note: associated function defined here
--> /usr/share/cargo/registry/roff-0.2.1/src/lib.rs:48:12
|
48 | pub fn new() -> Self {
| ^^^
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:131:8
|
131 | page.section("NAME", &[desc])
| ^^^^^^^ method not found in `Roff`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:143:10
|
143 | page.section("DESCRIPTION", &[desc.to_owned()])
| ^^^^^^^ method not found in `Roff`
error[E0308]: mismatched types
--> src/man.rs:172:14
|
172 | msg.push(format!(" {}", arg.name));
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Inline`, found struct `String`
|
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:175:8
|
175 | page.section("SYNOPSIS", &msg)
| ^^^^^^^ method not found in `Roff`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:208:8
|
208 | page.section(title, &auth_values)
| ^^^^^^^ method not found in `Roff`
error[E0277]: the trait bound `String: From<&&String>` is not satisfied
--> src/man.rs:227:22
|
227 | args.push(bold(&short));
| ---- ^^^^^^
| | |
| | the trait `From<&&String>` is not implemented for `String`
| | help: consider adding dereference here: `&*short`
| required by a bound introduced by this call
|
= help: the following implementations were found:
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
and 2 others
= note: required because of the requirements on the impl of `Into<String>` for `&&String`
note: required by a bound in `bold`
--> /usr/share/cargo/registry/roff-0.2.1/src/lib.rs:190:25
|
190 | pub fn bold(input: impl Into<String>) -> Inline {
| ^^^^^^^^^^^^ required by this bound in `bold`
error[E0308]: mismatched types
--> src/man.rs:227:17
|
227 | args.push(bold(&short));
| ^^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0277]: the trait bound `String: From<&&String>` is not satisfied
--> src/man.rs:233:22
|
233 | args.push(bold(&long));
| ---- ^^^^^
| | |
| | the trait `From<&&String>` is not implemented for `String`
| | help: consider adding dereference here: `&*long`
| required by a bound introduced by this call
|
= help: the following implementations were found:
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
and 2 others
= note: required because of the requirements on the impl of `Into<String>` for `&&String`
note: required by a bound in `bold`
--> /usr/share/cargo/registry/roff-0.2.1/src/lib.rs:190:25
|
190 | pub fn bold(input: impl Into<String>) -> Inline {
| ^^^^^^^^^^^^ required by this bound in `bold`
error[E0308]: mismatched types
--> src/man.rs:233:17
|
233 | args.push(bold(&long));
| ^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:245:8
|
245 | page.section("FLAGS", &arr)
| ^^^^^^^ method not found in `Roff`
error[E0277]: the trait bound `String: From<&&String>` is not satisfied
--> src/man.rs:264:22
|
264 | args.push(bold(&short));
| ---- ^^^^^^
| | |
| | the trait `From<&&String>` is not implemented for `String`
| | help: consider adding dereference here: `&*short`
| required by a bound introduced by this call
|
= help: the following implementations were found:
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
and 2 others
= note: required because of the requirements on the impl of `Into<String>` for `&&String`
note: required by a bound in `bold`
--> /usr/share/cargo/registry/roff-0.2.1/src/lib.rs:190:25
|
190 | pub fn bold(input: impl Into<String>) -> Inline {
| ^^^^^^^^^^^^ required by this bound in `bold`
error[E0308]: mismatched types
--> src/man.rs:264:17
|
264 | args.push(bold(&short));
| ^^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0277]: the trait bound `String: From<&&String>` is not satisfied
--> src/man.rs:270:22
|
270 | args.push(bold(&long));
| ---- ^^^^^
| | |
| | the trait `From<&&String>` is not implemented for `String`
| | help: consider adding dereference here: `&*long`
| required by a bound introduced by this call
|
= help: the following implementations were found:
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
and 2 others
= note: required because of the requirements on the impl of `Into<String>` for `&&String`
note: required by a bound in `bold`
--> /usr/share/cargo/registry/roff-0.2.1/src/lib.rs:190:25
|
190 | pub fn bold(input: impl Into<String>) -> Inline {
| ^^^^^^^^^^^^ required by this bound in `bold`
error[E0308]: mismatched types
--> src/man.rs:270:17
|
270 | args.push(bold(&long));
| ^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0308]: mismatched types
--> src/man.rs:273:15
|
273 | args.push(italic(&opt.name));
| ^^^^^^^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0277]: the trait bound `String: From<&&String>` is not satisfied
--> src/man.rs:281:24
|
281 | args.push(italic(&default));
| ------ ^^^^^^^^
| | |
| | the trait `From<&&String>` is not implemented for `String`
| | help: consider adding dereference here: `&*default`
| required by a bound introduced by this call
|
= help: the following implementations were found:
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
and 2 others
= note: required because of the requirements on the impl of `Into<String>` for `&&String`
note: required by a bound in `italic`
--> /usr/share/cargo/registry/roff-0.2.1/src/lib.rs:195:27
|
195 | pub fn italic(input: impl Into<String>) -> Inline {
| ^^^^^^^^^^^^ required by this bound in `italic`
error[E0308]: mismatched types
--> src/man.rs:281:17
|
281 | args.push(italic(&default));
| ^^^^^^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:294:8
|
294 | page.section("OPTIONS", &arr)
| ^^^^^^^ method not found in `Roff`
error[E0308]: mismatched types
--> src/man.rs:313:15
|
313 | args.push(bold(&env.name));
| ^^^^^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0277]: the trait bound `String: From<&&String>` is not satisfied
--> src/man.rs:321:24
|
321 | args.push(italic(&default));
| ------ ^^^^^^^^
| | |
| | the trait `From<&&String>` is not implemented for `String`
| | help: consider adding dereference here: `&*default`
| required by a bound introduced by this call
|
= help: the following implementations were found:
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
and 2 others
= note: required because of the requirements on the impl of `Into<String>` for `&&String`
note: required by a bound in `italic`
--> /usr/share/cargo/registry/roff-0.2.1/src/lib.rs:195:27
|
195 | pub fn italic(input: impl Into<String>) -> Inline {
| ^^^^^^^^^^^^ required by this bound in `italic`
error[E0308]: mismatched types
--> src/man.rs:321:17
|
321 | args.push(italic(&default));
| ^^^^^^^^^^^^^^^^ expected struct `String`, found enum `Inline`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:334:8
|
334 | page.section("ENVIRONMENT", &arr)
| ^^^^^^^ method not found in `Roff`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:353:8
|
353 | page.section(
| ^^^^^^^ method not found in `Roff`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:383:8
|
383 | page.section(&custom_section.name, ¶graphs)
| ^^^^^^^ method not found in `Roff`
error[E0308]: mismatched types
--> src/man.rs:425:64
|
425 | let example = list(&[text], &[bold(full_command.as_str()), output]);
| ^^^^^^ expected enum `Inline`, found struct `String`
error[E0599]: no method named `section` found for struct `Roff` in the current scope
--> src/man.rs:428:8
|
428 | page.section("examples", &arr)
| ^^^^^^^ method not found in `Roff`
Some errors have detailed explanations: E0061, E0277, E0308, E0432, E0599.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `man` due to 28 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
from man.
Related Issues (17)
- Which sections should a man page have? HOT 3
- Have method for file path HOT 3
- Have "source" section
- Add DESCRIPTION section
- API design HOT 2
- The README example does not compile HOT 1
- Support for custom sections? HOT 3
- Improve `exit status` section HOT 5
- Add version/date API HOT 1
- Add examples API HOT 1
- Format example in README to show bold HOT 1
- Document full use-case (e.g., `build.rs` script) HOT 5
- Options with no "="
- Accept more types of positional arguments
- Design: how should we display subcommands? HOT 1
- Move clap v3 -> man glue code to clap_generate HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from man.